I have a transparent status bar and opaque navigation bar;
When I remove the line ‘View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN’ the keyboard works very well and pushes up the screen but status bar becomes transparent revealing phone wallpaper behind.
Instead, adding this code, keyboard covers input and textarea but status bar is correct. Have been trying all solutions here on stack and softInputAssist java file. Please any help! Have tried 'fitsSystemWindows', 'SOFT_INPUT_ADJUST_RESIZE', SOFT_INPUT_ADJUST_PAN'.. none works! thank you!
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowTranslucentStatus" tools:targetApi="kitkat">true</item>
<item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
</style>
<FrameLayout
android:id="@+id/ad_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:fitsSystemWindows="true">
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
//getWindow().setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
getWindow().setSoftInputMode(
WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
getWindow().setStatusBarColor(Color.TRANSPARENT);
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}