This commit is contained in:
ocean 2026-01-07 18:42:20 +08:00
parent 1ae2a9d552
commit 8c8f04cc17
3 changed files with 16 additions and 13 deletions

View File

@ -19,8 +19,8 @@ android {
applicationId = "com.keyborad.theme.trendyborad"
minSdk = 24
targetSdk = 36
versionCode = 6
versionName = "1.5"
versionCode = 7
versionName = "1.6"
setProperty(
"archivesBaseName",
"TrendyBoard-" + versionName + "(${versionCode})_$timestamp"

View File

@ -45,10 +45,11 @@ public class TrendyMyInputMethodService extends InputMethodService implements Tr
private VideoView videoView;
private int a = R.xml.xml_one;
private int b= R.xml.xml_two;
private int b = R.xml.xml_two;
private int c = R.xml.xml_three;
private int curImeAction = EditorInfo.IME_ACTION_UNSPECIFIED;
@SuppressLint("InflateParams")
@Override
public View onCreateInputView() {
@ -73,7 +74,7 @@ public class TrendyMyInputMethodService extends InputMethodService implements Tr
@Override
public void onWindowHidden() {
super.onWindowHidden();
if(videoView.isPlaying()){
if (videoView.isPlaying()) {
videoView.pause();
}
@ -86,18 +87,18 @@ public class TrendyMyInputMethodService extends InputMethodService implements Tr
curImeAction = TrendyCommon.INSTANCE.getTextForImeAction(currentInputEditorInfo.imeOptions);
String skinPath = TrendySaveCurrentTheme.INSTANCE.getSkinPath();
if(skinPath == null || skinPath.isEmpty()){
if (skinPath == null || skinPath.isEmpty()) {
Log.d(TrendyApp.TAG, "---------skinPath= bull");
myKeyBoardView.updateUi(curImeAction);
}else {
} else {
Log.d(TrendyApp.TAG, "---------skinPath= 1111");
com.keyborad.theme.trendyborad.trendykeyboardhelper.TrendyKeyFunctions.INSTANCE.readBgOrVideo(this, new Function2<String, Drawable, Unit>() {
@Override
public Unit invoke(String s, Drawable drawable) {
Log.d(TrendyApp.TAG, "---------s= "+s+"---------drawable="+drawable);
Log.d(TrendyApp.TAG, "---------s= " + s + "---------drawable=" + drawable);
if (s != null) {
myKeyBoardView.setBackground(null);
if(s.endsWith(".gif")){
if (s.endsWith(".gif")) {
imBG.setVisibility(View.VISIBLE);
videoView.setVisibility(View.GONE);
Glide.with(TrendyMyInputMethodService.this)
@ -115,8 +116,8 @@ public class TrendyMyInputMethodService extends InputMethodService implements Tr
}
return false;
}
}).into(imBG) ;
}else if(s.endsWith(".mp4")){
}).into(imBG);
} else if (s.endsWith(".mp4")) {
imBG.setVisibility(View.GONE);
videoView.setVisibility(View.VISIBLE);
videoView.setVideoPath(s);
@ -144,7 +145,9 @@ public class TrendyMyInputMethodService extends InputMethodService implements Tr
@Override
public void onDestroy() {
super.onDestroy();
videoView.stopPlayback();
if (videoView != null) {
videoView.stopPlayback();
}
}
@Override

View File

@ -1,6 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="MyKeyBoard" beanWrapper="Theme.MaterialComponents.DayNight.NoActionBar">
<style name="MyKeyBoard" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_200</item>
<item name="colorPrimaryVariant">@color/purple_700</item>