Make an android activity full screen over a button -


im new on android development , want know how can make android activity fullscreen via icon placed on toolbar.

thank you.

please click on link example image: click preview example

i think previous post may give looking for:

fullscreen activity in android?

from post mentioned above:

you can programatically:

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); } } 

or can via androidmanifest.xml file:

<activity android:name=".activityname" android:label="@string/app_name" android:theme="@android:style/theme.notitlebar.fullscreen"/> 

how code should differ:

public class activityname extends activity { @override public void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     // remove title     button x = findviewbyid(r.id.yourbutton);        x.setonclicklistener(new view.onclicklistener() {           @override public void onclick(view v) {             requestwindowfeature(window.feature_no_title);             getwindow().setflags(windowmanager.layoutparams.flag_fullscreen,              windowmanager.layoutparams.flag_fullscreen);              setcontentview(r.layout.main);           }        }); } } 

this link button code.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo