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

Find Hours Diffrence in Kotlin

  In Kotlin, determining the difference in hours between two timestamps is a common task, especially in scenarios involving time-based calcu...