Sunday, 27 September 2020

Enable Window Full Screen in Android Studio

 Here is the example to make window full screen , so lets see code below here how its works

Window full screen code is gone in your .java file code in the MainActivity.java


public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
getSupportActionBar().hide();
}
}


So , above code is how to make window full screen in your android application.

And below is the full Source code of it.

Enable Window Full Screen

No comments:

Post a Comment

Comments

Snackbar in Kotlin

How to show snackbar in place of toast message , below is the code for showing snackbar in kotlin. Below code is put in Utils.kt  (common fi...