This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun setupVersionInfo() { | |
findPreference(getString(R.string.pref_version)).title = "V${BuildConfig.VERSION_NAME}" | |
findPreference(getString(R.string.pref_version)).summary = String.format( | |
getString(R.string.version_summary), | |
BuildConfig.VERSION_CODE, | |
SimpleDateFormat("dd MMM yyy", Locale.US).format(BuildConfig.BUILD_TIME) | |
) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="uk.co.jakelee.dynamiciconchanging"> | |
<application | |
android:label="@string/app_name" | |
android:theme="@style/AppTheme"> | |
<activity android:name=".MainActivity"> | |
<intent-filter> | |
<category android:name="android.intent.category.LAUNCHER"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="uk.co.jakelee.updatelistener"> | |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" | |
android:roundIcon="@mipmap/ic_launcher_round" | |
android:supportsRtl="true" | |
android:theme="@style/AppTheme"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Overall config | |
dist: xenial | |
language: android | |
# Android version config | |
android: | |
components: | |
- build-tools-28.0.3 | |
- android-28 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Overall config | |
dist: xenial | |
language: android | |
# Android version config | |
android: | |
components: | |
- build-tools-28.0.3 | |
- android-28 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Overall config | |
dist: xenial | |
language: android | |
# Android version config | |
android: | |
components: | |
- build-tools-28.0.3 | |
- android-28 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Environment variables | |
REPO=${TRAVIS_REPO_SLUG} | |
BRANCH=${TRAVIS_BRANCH} | |
COMMIT_HASH=${TRAVIS_COMMIT} | |
COMMIT_HASH_SHORT=${COMMIT_HASH:0:7} | |
COMMIT_MESSAGE=${TRAVIS_COMMIT_MESSAGE} | |
IS_PULL_REQUEST=${TRAVIS_PULL_REQUEST} | |
BUILD_DIR=${TRAVIS_BUILD_DIR} | |
BUILD_NUMBER=${TRAVIS_BUILD_NUMBER} | |
BUILD_URL=${TRAVIS_BUILD_WEB_URL} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private var animatorSet: AnimatorSet? = null | |
private fun startAnimation(target: ImageView) { | |
val animationLayers = target.drawable as LayerDrawable | |
val moveImageViewLeft = ObjectAnimator.ofFloat(target, View.TRANSLATION_X, -200f).setDuration(6000) | |
val moveImageViewRight = ObjectAnimator.ofFloat(target, View.TRANSLATION_X, 0f).setDuration(6000) | |
val redCircle = animationLayers.findDrawableByLayerId(R.id.red_circle) as GradientDrawable | |
val redCircleFadeOut = ObjectAnimator.ofInt(redCircle, "alpha", 255, 100).setDuration(1000) | |
val redCircleFadeIn = ObjectAnimator.ofInt(redCircle, "alpha", 100, 255).setDuration(100) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package uk.co.jakelee.apodwallpaper.example | |
import uk.co.jakelee.apodwallpaper.BuildConfig | |
class MyClass() { | |
val key = BuildConfig.APOD_API_KEY | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ItemAdapter( | |
private val itemClickListener: (OwnedItem) -> Unit, | |
private val itemSaver: (List<OwnedItem>) -> Unit | |
) : RecyclerView.Adapter<ItemViewHolder>() { | |
val items = ArrayList<OwnedItem>() | |
fun setItems(newItems: List<OwnedItem>) { | |
val result = calculateDiff(newItems) | |
items.clear() |