hide the navigation bar icons if they are software ones
This commit is contained in:
parent
ddf942062f
commit
b7b5f8e8e8
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue