Setting activity to fullscreen mode in android can be done either programmatically or via
A) Programmatically
AndroidManifest.xml
file.A) Programmatically
public class FullScreenActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
}
}
B) Via AndroidManifest.xml <activity android:name=".
FullScreenActivity
" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>
No comments:
Post a Comment