If you are annoyed that "Sources for Android 26" are not yet available via SDK manager, this might be for you:
- Collect source files
mkdir android-sdk-source-build
cd android-sdk-source-build
mkdir -p frameworks/base
/** | |
* Observable manager for saving the [Cart]'s resource information. | |
*/ | |
class CartManager : LiveData<Resource<Cart?>>() { | |
init { | |
value = Success(null) | |
} | |
/** |
#!/usr/bin/env bash | |
# I've found that the "Migrate to AndroidX" converter in Android Studio doesn't work very | |
# well, so I wrote my own script to do the simple job of converting package names. | |
# | |
# You can download a CSV of package names here: https://developer.android.com/topic/libraries/support-library/downloads/androidx-class-mapping.csv | |
# | |
# It'll run faster on a clean build because then there are fewer files to scan over. | |
# | |
# Uses `gsed` because I'm on a Mac. Can easily replace with `sed` if you don't have `gsed`. |
interface ApiInterface { | |
@GET("User") | |
fun getUser( | |
@Query("user_id") userId: String | |
): Deferred<User> | |
} |
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
Copyright 2018 Google Inc. | |
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | |
in compliance with the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software distributed under the License | |
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | |
or implied. See the License for the specific language governing permissions and limitations under | |
the License. |
/* | |
* Copyright 2018 Google, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<!-- | |
References | |
- https://www.materialpalette.com/colors | |
- https://www.materialui.co/colors | |
- https://material-ui.com/style/color/ | |
--> |
import org.joda.time.LocalDate | |
/** | |
* @return true if the supplied date is in the future else false | |
*/ | |
fun isUpcoming(millis: Long): Boolean { | |
return !isTomorrow(millis) && LocalDate(millis).isAfter(LocalDate.now()) | |
} | |
/** |
/* | |
* Copyright 2017 Google, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
/* | |
* Copyright (C) 2017 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
If you are annoyed that "Sources for Android 26" are not yet available via SDK manager, this might be for you:
mkdir android-sdk-source-build
cd android-sdk-source-build
mkdir -p frameworks/base