mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-10 00:27:45 +00:00
Merge remote-tracking branch 'refs/remotes/origin/main'
This commit is contained in:
commit
e042adc5b8
6 changed files with 15 additions and 17 deletions
|
@ -148,6 +148,8 @@ public class KeyboardView extends View {
|
|||
|
||||
mPaint.setAntiAlias(true);
|
||||
mTypeface = Settings.getInstance().getCustomTypeface();
|
||||
|
||||
setFitsSystemWindows(true);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
|
|
@ -71,6 +71,7 @@ class ClipboardHistoryView @JvmOverloads constructor(
|
|||
getEnabledClipboardToolbarKeys(context.prefs())
|
||||
.forEach { toolbarKeys.add(createToolbarKey(context, KeyboardIconsSet.instance, it)) }
|
||||
keyboardAttr.recycle()
|
||||
fitsSystemWindows = true
|
||||
}
|
||||
|
||||
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
||||
|
|
|
@ -64,4 +64,4 @@ class ClipboardLayoutParams(ctx: Context) {
|
|||
view.layoutParams = this
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,6 +106,7 @@ public final class EmojiPalettesView extends LinearLayout
|
|||
R.styleable.EmojiPalettesView_categoryPageIndicatorColor, 0);
|
||||
emojiPalettesViewAttr.recycle();
|
||||
mEmojiLayoutManager = new LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false);
|
||||
setFitsSystemWindows(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -360,4 +361,4 @@ public final class EmojiPalettesView extends LinearLayout
|
|||
public void clearKeyboardCache() {
|
||||
mEmojiCategory.clearKeyboardCache();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,14 +8,9 @@ package helium314.keyboard.keyboard.internal;
|
|||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Insets;
|
||||
import android.os.Build;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.SparseIntArray;
|
||||
|
||||
import android.view.WindowInsets;
|
||||
import android.view.WindowManager;
|
||||
import android.view.WindowMetrics;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
|
@ -230,16 +225,6 @@ public class KeyboardParams {
|
|||
mBottomPadding = (int) (keyboardAttr.getFraction(
|
||||
R.styleable.Keyboard_keyboardBottomPadding, height, height, 0)
|
||||
* Settings.getValues().mBottomPaddingScale);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 35) {
|
||||
WindowManager wm = context.getSystemService(WindowManager.class);
|
||||
WindowMetrics windowMetrics = wm.getCurrentWindowMetrics();
|
||||
WindowInsets windowInsets = windowMetrics.getWindowInsets();
|
||||
int insetTypes = WindowInsets.Type.systemBars() | WindowInsets.Type.displayCutout();
|
||||
Insets insets = windowInsets.getInsetsIgnoringVisibility(insetTypes);
|
||||
mBottomPadding += insets.bottom;
|
||||
}
|
||||
|
||||
mLeftPadding = (int) (keyboardAttr.getFraction(
|
||||
R.styleable.Keyboard_keyboardLeftPadding, width, width, 0)
|
||||
* Settings.getValues().mSidePaddingScale);
|
||||
|
|
|
@ -23,6 +23,7 @@ import helium314.keyboard.latin.utils.DictionaryInfoUtils.USER_DICTIONARY_SUFFIX
|
|||
import helium314.keyboard.latin.utils.LayoutType
|
||||
import helium314.keyboard.latin.utils.LayoutType.Companion.folder
|
||||
import helium314.keyboard.latin.utils.LayoutUtilsCustom
|
||||
import helium314.keyboard.latin.utils.Log
|
||||
import helium314.keyboard.latin.utils.ScriptUtils.SCRIPT_LATIN
|
||||
import helium314.keyboard.latin.utils.ScriptUtils.script
|
||||
import helium314.keyboard.latin.utils.SubtypeSettings
|
||||
|
@ -51,6 +52,14 @@ class App : Application() {
|
|||
checkVersionUpgrade(this)
|
||||
app = this
|
||||
Defaults.initDynamicDefaults(this)
|
||||
|
||||
val packageInfo = packageManager.getPackageInfo(packageName, 0)
|
||||
@Suppress("DEPRECATION")
|
||||
Log.i(
|
||||
"startup", "Starting ${applicationInfo.processName} version ${packageInfo.versionName} (${
|
||||
packageInfo.versionCode
|
||||
}) on Android ${android.os.Build.VERSION.RELEASE} (SDK ${android.os.Build.VERSION.SDK_INT})"
|
||||
)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue