mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 00:15:32 +00:00
Merge pull request #14935 from keymanapp/fix/android/style-status-bar-white
fix(android): Set the main app background white
This commit is contained in:
commit
cfddda8d1e
2 changed files with 8 additions and 5 deletions
|
|
@ -619,11 +619,14 @@ public class MainActivity extends BaseActivity implements OnKeyboardEventListene
|
|||
getTheme().resolveAttribute(android.R.attr.actionBarSize, outValue, true);
|
||||
int actionBarHeight = getResources().getDimensionPixelSize(outValue.resourceId);
|
||||
|
||||
// *** TO DO: Try to check if status bar is visible, set statusBarHeight to 0 if it is not visible ***
|
||||
// Status bar height only used for portrait orientation
|
||||
int statusBarHeight = 0;
|
||||
int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android");
|
||||
if (resourceId > 0) {
|
||||
statusBarHeight = getResources().getDimensionPixelSize(resourceId);
|
||||
if (lastOrientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||
// *** TO DO: Try to check if status bar is visible, set statusBarHeight to 0 if it is not visible ***
|
||||
int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android");
|
||||
if (resourceId > 0) {
|
||||
statusBarHeight = getResources().getDimensionPixelSize(resourceId);
|
||||
}
|
||||
}
|
||||
int navigationBarHeight = KMManager.getNavigationBarHeight(context, KeyboardType.KEYBOARD_TYPE_INAPP);
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
android:fitsSystemWindows="true"
|
||||
android:layout_above="@+id/KMKeyboard"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/yellow_background"
|
||||
android:background="@android:color/white"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<include layout="@layout/titlebar"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue