This article describes the Android programming implementation of the hidden status bar and testing activity is the method. Share to everyone for your reference, specific as follows:
First, hide the status bar
The method is as follows: In the program add//remove title of that part of the code can be achieved.
Package cn.edu.pku;
Import android.app.Activity;
Import Android.os.Bundle;
Import Android.view.Window;
Import Android.view.WindowManager;
public class Framelayoutactivity extends activity {
@Override public
void OnCreate (Bundle savedinstancestate) {
super.oncreate (savedinstancestate);
Remove title
requestwindowfeature (window.feature_no_title);
GetWindow (). SetFlags (WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_ fullscreen);
Setcontentview (R.layout.main);
}
Second, how to judge a ativity is not in the activity.
You can add the following code implementation to your program:
try {startactivity (new Intent (..));}
catch (activitynotfoundexception e)
{toast.maketext (this, ' not installed. ', Length_short). Show ();
For more information on Android-related content readers can view the site: "The activity of Android programming skills Summary", "Android View Summary", "Android operation SQLite Database Skills Summary", " Android operation JSON format data tips summary, "Android Database Operation skills Summary", "Android File Operation skills Summary", "Android programming development of SD card Operation Summary", "Android Development introduction and Advanced Course", " Android Resource Operation tips Summary and the "Android Controls usage Summary"
I hope this article will help you with the Android program.