Removed the option for translucent nav bar completely, and cleaned up the code in ThemeBaseActivity

This commit is contained in:
Karim Abou Zeid 2015-04-18 13:05:27 +02:00
commit b02391161e
11 changed files with 25 additions and 57 deletions

View file

@ -76,22 +76,22 @@ public class Util {
return result;
}
@TargetApi(19)
public static void setNavBarTranslucent(Window window, boolean translucent) {
if (translucent) {
window.setFlags(
WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION,
WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
return;
}
final WindowManager.LayoutParams attrs = window
.getAttributes();
attrs.flags &= (~WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
window.setAttributes(attrs);
window.clearFlags(
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
}
// @TargetApi(19)
// public static void setNavBarTranslucent(Window window, boolean translucent) {
// if (translucent) {
// window.setFlags(
// WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION,
// WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
// return;
// }
//
// final WindowManager.LayoutParams attrs = window
// .getAttributes();
// attrs.flags &= (~WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
// window.setAttributes(attrs);
// window.clearFlags(
// WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
// }
@TargetApi(19)
public static void setStatusBarTranslucent(Window window, boolean translucent) {