diff --git a/.gitignore b/.gitignore index ba3c4db..4a87538 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ output-metadata.json .idea/misc.xml /captures /ktlint +/app/debug +/app/release # Built application files # *.apk diff --git a/CHANGELOG.md b/CHANGELOG.md index 6033c99..bec37e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,12 +3,13 @@ All major and minor version changes will be documented in this file. Details of patch-level version changes can be found in [commit messages](../../commits/master). -## Next_Ver - 2021/11/xx +## 20211118 - 2021/11/18 - Attempt to resolve issue reported where the app crashed when importing stickers (suspected cause of a `java.lang.OutOfMemoryError`) - Improve sticker layout https://github.com/FredHappyface/Android.EweSticker/issues/24 - Improve large sticker preview https://github.com/FredHappyface/Android.EweSticker/issues/25 +- Recent tab can now be saved as last used https://github.com/FredHappyface/Android.EweSticker/issues/30 ## 20211114 - 2021/11/14 diff --git a/README.md b/README.md index 399a666..1eedbbf 100644 --- a/README.md +++ b/README.md @@ -125,16 +125,16 @@ then download/ install ### Download the APK -1. For releases, navigate to the /app/release directory. For debug, navigate to /app/debug +1. For releases, navigate to the releases page [here](../../releases). 2. Select the debug or release APK depending on your preference. Note that the filenames are in the form: com.fredhappyface.ewesticker-(version)-(debug|release).apk **Or** [Direct apk
-download](/app/release) +download" height="80">](../../releases) -Follow the link to the /app/release directory by clicking on the badge above. +Navigate to the releases page by clicking on the badge above. ## Download Project diff --git a/TUTORIAL.md b/TUTORIAL.md index a54d60e..593a474 100644 --- a/TUTORIAL.md +++ b/TUTORIAL.md @@ -53,16 +53,16 @@ then download/ install ### Download the APK -1. For releases, navigate to the /app/release directory. For debug, navigate to /app/debug +1. For releases, navigate to the releases page [here](../../releases). 2. Select the debug or release APK depending on your preference. Note that the filenames are in the form: com.fredhappyface.ewesticker-(version)-(debug|release).apk **Or** [Direct apk
-download](/app/release) +download" height="80">](../../releases) -Follow the link to the /app/release directory by clicking on the badge above. +Navigate to the releases page by clicking on the badge above. ## Step 3 - Select Directory with EweSticker (and wait...) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 3482743..1ead0c9 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -11,8 +11,8 @@ android { applicationId = "com.fredhappyface.ewesticker" minSdk = 26 targetSdk = 31 - versionCode = 20211114 - versionName = "2021.11.14" + versionCode = 20211118 + versionName = "2021.11.18" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" setProperty("archivesBaseName", "$applicationId-$versionName") } @@ -41,7 +41,7 @@ android { dependencies { implementation("org.jetbrains.kotlin:kotlin-stdlib:1.5.31") implementation("androidx.core:core-ktx:1.7.0") - implementation("androidx.appcompat:appcompat:1.3.1") + implementation("androidx.appcompat:appcompat:1.4.0") implementation("com.google.android.material:material:1.4.0") implementation("androidx.preference:preference-ktx:1.1.1") implementation("io.coil-kt:coil:1.4.0") diff --git a/app/debug/com.fredhappyface.ewesticker-2021.11.14-debug.apk b/app/debug/com.fredhappyface.ewesticker-2021.11.14-debug.apk deleted file mode 100644 index 9d50e65..0000000 Binary files a/app/debug/com.fredhappyface.ewesticker-2021.11.14-debug.apk and /dev/null differ diff --git a/app/release/com.fredhappyface.ewesticker-2021.11.14-release.apk b/app/release/com.fredhappyface.ewesticker-2021.11.14-release.apk deleted file mode 100644 index 7b37887..0000000 Binary files a/app/release/com.fredhappyface.ewesticker-2021.11.14-release.apk and /dev/null differ diff --git a/app/src/main/java/com/fredhappyface/ewesticker/ImageKeyboard.kt b/app/src/main/java/com/fredhappyface/ewesticker/ImageKeyboard.kt index 44e4399..ce43d32 100644 --- a/app/src/main/java/com/fredhappyface/ewesticker/ImageKeyboard.kt +++ b/app/src/main/java/com/fredhappyface/ewesticker/ImageKeyboard.kt @@ -259,6 +259,17 @@ class ImageKeyboard : InputMethodService() { return false } + /** + * Select the recent pack and create the pack layout + * + */ + private fun recentPackLayout() { + val packLayout = createPackLayout(mRecentCache.toFiles().reversedArray()) + mPackContent.removeAllViewsInLayout() + packLayout.parent ?: mPackContent.addView(packLayout) + mActivePack = "__recentSticker__" + } + /** * Swap the pack layout every time a pack is selected. If already cached use that * otherwise create the pack layout @@ -394,8 +405,7 @@ class ImageKeyboard : InputMethodService() { val recentButton = addPackButton(ResourcesCompat.getDrawable(resources, R.drawable.ic_clock, null)) recentButton.setOnClickListener { - mPackContent.removeAllViewsInLayout() - mPackContent.addView(createPackLayout(mRecentCache.toFiles().reversedArray())) + recentPackLayout() } // Packs val sortedPackNames = mLoadedPacks.keys.toTypedArray() @@ -410,10 +420,10 @@ class ImageKeyboard : InputMethodService() { } } if (sortedPackNames.isNotEmpty()) { - if (mActivePack in sortedPackNames) { - switchPackLayout((mLoadedPacks[mActivePack] ?: return)) - } else { - switchPackLayout((mLoadedPacks[sortedPackNames[0]] ?: return)) + when (mActivePack) { + "__recentSticker__" -> recentPackLayout() + in sortedPackNames -> switchPackLayout((mLoadedPacks[mActivePack] ?: return)) + else -> switchPackLayout((mLoadedPacks[sortedPackNames[0]] ?: return)) } } } diff --git a/metadata/en-US/changelogs/20211118.txt b/metadata/en-US/changelogs/20211118.txt new file mode 100644 index 0000000..d34e576 --- /dev/null +++ b/metadata/en-US/changelogs/20211118.txt @@ -0,0 +1,6 @@ +