Pages

Saturday, June 30, 2018

How to create a full screen activity in Android

How to create a full screen activity in Android


In this tutorial we are going to learn how to create a full screen Activity..
Copy and download the code and try yourself..
 
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
import android.app.Activity;


public class FullscreenActivities extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

//removes the unwanted contents.....
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
//......................

setContentView(R.layout.activity_fullscreen_activities);



go to link download