Wednesday, November 21, 2012

Full screen in android

Hiding the title bar & status bar is used in applications to show full screen to user.
Hide the Status bar through code.

Click below link for more update about android

Using JAVA code


@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Hide the Title Bar
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.main);
// Hide the Status Bar
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}

Using XML



Hide the Title bar through AndroidManifest.xml


<activity  android:name=".YourClassName"
android:theme="@android:style/Theme.NoTitleBar"/>

Hide the Status bar through AndroidManifest.xml

<activity  android:name=".YourClassName"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>

Click below link for more update about android

No comments:

Post a Comment