hide the navigation bar icons if they are software ones

This commit is contained in:
tibbi 2016-06-02 15:27:42 +02:00
parent ddf942062f
commit b7b5f8e8e8
1 changed files with 5 additions and 0 deletions

View File

@ -36,6 +36,7 @@ public class MainActivity extends AppCompatActivity {
preview = new Preview(this, (SurfaceView) findViewById(R.id.surfaceView));
preview.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
viewHolder.addView(preview);
hideNavigationBarIcons();
}
@OnClick(R.id.toggle_camera)
@ -74,6 +75,10 @@ public class MainActivity extends AppCompatActivity {
preview.takePicture();
}
private void hideNavigationBarIcons() {
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
}
@Override
protected void onResume() {
super.onResume();