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.