I am using themeable browser plugin link for display url in my Ionic application.
Default themeable browser take black color in status bar, and I have to change it. I am trying below code for that but nothing happens.
Window window = cordova.getActivity().getWindow();
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
{
window.setStatusBarColor(ContextCompat.getColor(cordova.getActivity(), android.R.color.holo_green_dark));
}
I am changing this code in Android file which is located here:
https://github.com/initialxy/cordova-plugin-themeablebrowser/blob/master/src/android/ThemeableBrowser.java
It seems that the dialog height is incorrectly calculated just fork the plugin and correct the height calculation. The status bar will maintain the color it had before opening the ThemeableBrowser :
Display display = cordova.getActivity().getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
lp.height = size.y;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With