Thursday, 15 May 2014

Making activity fullscreen in Android 4.0 -



Making activity fullscreen in Android 4.0 -

i've looked in many web sites. wanna create activity total screen in android 4.0 (whole screen virtual buttons , bar). there many solutions in stack overflow. many of them ticked works. when seek these solutions, don't work! couldn't find making mistake. i'm giving illustration code given reply problem (it's worked said):

class="lang-java prettyprint-override">import android.app.activity; import android.os.bundle; import android.view.window; import android.view.windowmanager; public class activityname 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); } }

this isn't enough:

class="lang-cs prettyprint-override">this.getwindow().setflags(windowmanager.layoutparams.flag_fullscreen, windowmanager.layoutparams.flag_fullscreen);

in order accomplish want accomplish, add together this:

class="lang-cs prettyprint-override">this.getwindow().getdecorview() .setsystemuivisibility(view.system_ui_flag_hide_navigation);

i know rather old question (with bunch of duplicates), found via google figured i'd still post solution.

fullscreen android-4.0

No comments:

Post a Comment