android-fullscreen

Immersive mode navigation becomes sticky after volume press or minimise-restore

依然范特西╮ 提交于 2019-11-26 12:21:37
问题 public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { this.getWindow().getDecorView().setSystemUiVisibility(getSystemUiFlags()); super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } private static int getSystemUiFlags() { return View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE

How to set dialog to show with full screen? [closed]

北城余情 提交于 2019-11-26 04:37:41
问题 I have a GridView which show a lot of images and when I click any image it will show full image in a full screen dialog Please tell me how to do that thanks. 回答1: try Dialog dialog=new Dialog(this,android.R.style.Theme.Black.NoTitleBar.Fullscreen) 回答2: based on this link , the correct answer (which i've tested myself) is: put this code in the constructor or the onCreate() method of the dialog: getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH

Fullscreen Activity in Android?

巧了我就是萌 提交于 2019-11-25 22:25:25
问题 How do I make an activity full screen? I mean without the notification bar. Any ideas? 回答1: You can do it programatically: public class ActivityName extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // remove title requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.main); } } Or you can do it via your