android - Dropdown Action Menu with Web Link -
as tried show on image, in app 've address bar, dropdown action menu , webview.
my question ; how can add described web links when clicked goes link in webview? menu not changeable or addable.
thank you.
please check source code , think you. here actionbar.onnavigationlistener click event
public class mainactivity extends activity { /** array of strings populate dropdown list */ string[] actions = new string[] { "bookmark", "subscribe", "share" }; /** called when activity first created. */ @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.main); /** create array adapter populate dropdownlist */ arrayadapter<string> adapter = new arrayadapter<string>(getbasecontext(), android.r.layout.simple_spinner_dropdown_item, actions); /** enabling dropdown list navigation action bar */ getactionbar().setnavigationmode(actionbar.navigation_mode_list); /** defining navigation listener */ actionbar.onnavigationlistener navigationlistener = new onnavigationlistener() { @override public boolean onnavigationitemselected(int itemposition, long itemid) { toast.maketext(getbasecontext(), "you selected : " + actions[itemposition] , toast.length_short).show(); return false; } }; /** setting dropdown items , item navigation listener actionbar */ getactionbar().setlistnavigationcallbacks(adapter, navigationlistener); } }
Comments
Post a Comment