20211011 - 2021/10/11
This commit is contained in:
parent
43b0e0a4f2
commit
c3e528de91
21
CHANGELOG.md
21
CHANGELOG.md
@ -2,8 +2,22 @@
|
||||
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).
|
||||
|
||||
## 20211011 - 2021/10/11
|
||||
|
||||
- Performance improvements to cache miss in `switchImageContainer`
|
||||
(call `createImageContainer(stickers)` once)
|
||||
- update screenshots with new phone frame
|
||||
- fix sticker shadows on light mode
|
||||
- tidy up files committed to git
|
||||
- attempt to fix https://github.com/FredHappyface/Android.EweSticker/issues/7
|
||||
by using `layoutInflater.inflate(R.layout.image_container, imageContainer, false)`
|
||||
in place of `View.inflate(applicationContext, R.layout.image_container, null)`
|
||||
- additional logging to predict `java.lang.IllegalStateException` (no prevention)
|
||||
in the hope that this provides additional context to make fixing easier if
|
||||
`imageContainer.addView(imageContainerLayout)` raises in the future
|
||||
|
||||
## 20210909 - 2021/09/09
|
||||
|
||||
- update ui
|
||||
- use MaterialCardView and Snackbar in settings (MainActivity)
|
||||
- improvements to the keyboard layout
|
||||
@ -12,6 +26,7 @@ patch-level version changes can be found in [commit messages](../../commits/mast
|
||||
- stability improvements
|
||||
|
||||
## 20210810 - 2021/08/10
|
||||
|
||||
- Code optimisations
|
||||
- Code clean-up
|
||||
- Removed APNG animation due to memory leak
|
||||
@ -23,16 +38,16 @@ patch-level version changes can be found in [commit messages](../../commits/mast
|
||||
- Updated gradle and deps
|
||||
- Add recent icon
|
||||
|
||||
|
||||
## 20210723 - 2021/07/23
|
||||
|
||||
- Added link to online tutorial (on GitHub)
|
||||
- Ignore the compat sticker when creating groups
|
||||
- SVG back arrow
|
||||
- Add headings to UI
|
||||
- Removed unnecessary permissions
|
||||
|
||||
|
||||
## 20210612 - 2021/06/12
|
||||
|
||||
- Changes from upstream:
|
||||
- Merged `ui-update`, `feature_distributed_apks`, `fallback`. Providing a fresher
|
||||
ui and the ability to send a fallback sticker for unsupported formats.
|
||||
@ -44,11 +59,13 @@ patch-level version changes can be found in [commit messages](../../commits/mast
|
||||
- Changed app icon
|
||||
|
||||
## app logo - 2021/06/11
|
||||
|
||||
- Change package name
|
||||
- Create app logo
|
||||
- Compile APKs
|
||||
|
||||
## first release - 2021/06/11
|
||||
|
||||
- Add to gh
|
||||
- todo...
|
||||
- compile apks
|
||||
|
@ -11,8 +11,8 @@ android {
|
||||
applicationId "com.fredhappyface.ewesticker"
|
||||
minSdkVersion 28
|
||||
targetSdkVersion 30
|
||||
versionCode 20210909
|
||||
versionName "2021.09.09"
|
||||
versionCode 20211011
|
||||
versionName "2021.10.11"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
@ -39,7 +39,7 @@ android {
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.5.30"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.5.31"
|
||||
implementation 'androidx.core:core-ktx:1.6.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.3.1'
|
||||
implementation 'com.google.android.material:material:1.4.0'
|
||||
|
Binary file not shown.
@ -23,7 +23,8 @@
|
||||
<service
|
||||
android:name="com.fredhappyface.ewesticker.ImageKeyboard"
|
||||
android:label="EweSticker"
|
||||
android:permission="android.permission.BIND_INPUT_METHOD">
|
||||
android:permission="android.permission.BIND_INPUT_METHOD"
|
||||
android:exported="false">
|
||||
<meta-data
|
||||
android:name="android.view.im"
|
||||
android:resource="@xml/method" />
|
||||
|
@ -7,6 +7,7 @@ import android.graphics.ImageDecoder
|
||||
import android.graphics.drawable.AnimatedImageDrawable
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.inputmethodservice.InputMethodService
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
@ -277,14 +278,17 @@ class ImageKeyboard : InputMethodService() {
|
||||
// Check the cache
|
||||
val imageContainerHash = stickers.hashCode()
|
||||
lateinit var imageContainerLayout: LinearLayout
|
||||
if (imageContainerHash !in imageContainerCache.keys) {
|
||||
imageContainerLayout = createImageContainer(stickers)
|
||||
imageContainerCache[imageContainerHash] = createImageContainer(stickers)
|
||||
} else {
|
||||
if (imageContainerHash in imageContainerCache.keys) {
|
||||
imageContainerLayout = imageContainerCache[imageContainerHash]!!
|
||||
} else {
|
||||
imageContainerLayout = createImageContainer(stickers)
|
||||
imageContainerCache[imageContainerHash] = imageContainerLayout
|
||||
}
|
||||
// Swap the image container
|
||||
imageContainer.removeAllViews()
|
||||
imageContainer.removeAllViewsInLayout()
|
||||
if (imageContainerLayout.parent != null){
|
||||
Log.e("Going to throw java.lang.IllegalStateException", imageContainerLayout.parent.toString())
|
||||
}
|
||||
imageContainer.addView(imageContainerLayout)
|
||||
}
|
||||
|
||||
@ -294,18 +298,18 @@ class ImageKeyboard : InputMethodService() {
|
||||
* @param stickers
|
||||
*/
|
||||
private fun createImageContainer(stickers: Array<File>): LinearLayout {
|
||||
val tempImageContainer =
|
||||
View.inflate(applicationContext, R.layout.image_container, null) as LinearLayout
|
||||
val imageContainer =
|
||||
layoutInflater.inflate(R.layout.image_container, imageContainer, false) as LinearLayout
|
||||
lateinit var imageContainerColumn: LinearLayout
|
||||
for (i in stickers.indices) {
|
||||
// Add a new column
|
||||
if (i % iconsPerColumn == 0) {
|
||||
imageContainerColumn = layoutInflater.inflate(
|
||||
R.layout.image_container_column,
|
||||
tempImageContainer,
|
||||
imageContainer,
|
||||
false
|
||||
) as LinearLayout
|
||||
tempImageContainer.addView(imageContainerColumn)
|
||||
imageContainer.addView(imageContainerColumn)
|
||||
}
|
||||
val imageCard = layoutInflater.inflate(
|
||||
R.layout.sticker_card,
|
||||
@ -330,7 +334,7 @@ class ImageKeyboard : InputMethodService() {
|
||||
}
|
||||
imageContainerColumn.addView(imageCard)
|
||||
}
|
||||
return tempImageContainer
|
||||
return imageContainer
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5,8 +5,8 @@ buildscript {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.0.2'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.30"
|
||||
classpath 'com.android.tools.build:gradle:7.0.3'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31"
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
Loading…
x
Reference in New Issue
Block a user