This sample shouldn't be hiding the nav bar.
Change-Id: I442c8abccf7c1d2969f5e6271c24b048b42b3110
This commit is contained in:
@@ -37,17 +37,6 @@ public class HelloActivity extends Activity {
|
|||||||
// in res/layout/hello_activity.xml
|
// in res/layout/hello_activity.xml
|
||||||
View view = getLayoutInflater().inflate(R.layout.hello_activity, null);
|
View view = getLayoutInflater().inflate(R.layout.hello_activity, null);
|
||||||
setContentView(view);
|
setContentView(view);
|
||||||
|
|
||||||
WindowManager.LayoutParams params = getWindow().getAttributes();
|
|
||||||
params.systemUiVisibility = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
|
|
||||||
getWindow().setAttributes(params);
|
|
||||||
view.setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener() {
|
|
||||||
@Override public void onSystemUiVisibilityChange(int visibility) {
|
|
||||||
WindowManager.LayoutParams params = getWindow().getAttributes();
|
|
||||||
params.systemUiVisibility = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
|
|
||||||
getWindow().setAttributes(params);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user