RSS

Android Fullscreen Activity

06 Jul

To set your app to full screen:

requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

it goes at the onCreate(Bundle) method right before the contentView. Like in our camera class:

protected void onCreate(Bundle b){
		//This will set the app to fullscreen
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
		
		super.onCreate(b);
		setContentView(R.layout.camera);
		
		InputStream is = getResources().openRawResource(R.drawable.back_mao);
		bmp = BitmapFactory.decodeStream(is);
		wall = (Button) findViewById(R.id.bSet);
		take = (Button) findViewById(R.id.bTake);
		pic = (ImageView) findViewById(R.id.ivImage);
		
		
		wall.setOnClickListener(this);
		take.setOnClickListener(this);
		
		
	}

 

Advertisements
 
Leave a comment

Posted by on July 6, 2012 in Uncategorized

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: