You can also hide the title of an activity if desired (such as when you just want to display a status update
to the user). To do so, use the
TITLE
requestWindowFeature() method and pass it the Window.FEATURE_NO_constant, like this:package
net.learn2develop.Activities;import
android.app.Activity;import
android.os.Bundle;import
android.util.Log;import
android.view.Window;public class
String
MainActivity extends Activity {tag = “Events”;/** Called when the activity is first created. */
@Override
public void
onCreate(Bundle savedInstanceState) {super
.onCreate(savedInstanceState);//---hides the title bar---
requestWindowFeature(Window.
FEATURE_NO_TITLE);setContentView(R.layout.
Log.
}
}main);d(tag, “In the onCreate() event”);
No comments:
Post a Comment