FORUMS
Remove All Ads from XDA

[Q] Error while run window.FEATURE_NO_TITLE

18 posts
Thanks Meter: 1
 
By chipp_zanuff, Junior Member on 26th November 2014, 10:59 AM
Post Reply Email Thread
i wanna ask, i have this error while running this program:
Code:
package com.example.new_first_android_apps;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.Window;

public class MainActivity extends Activity {

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

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
here's the screen shots:




can somebody help pointing where's my mistake?
 
 
28th November 2014, 04:55 PM |#2  
chipp_zanuff's Avatar
OP Junior Member
Thanks Meter: 1
 
More
hello?
8th December 2014, 02:32 PM |#3  
chipp_zanuff's Avatar
OP Junior Member
Thanks Meter: 1
 
More
Hello????????? Is there's anybody can help?????????
17th December 2014, 03:11 PM |#4  
Junior Member
Thanks Meter: 0
 
More
Change
requestWindowFeature(Window.FEATURE_NO_TITLE);
before setContentView and it runs well.

Code:
protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
                requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.activity_main);
		
	}
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes