android - Forward button functionality -
can give functionality of forward button in android app. in case of web app, urls , session id stored in stack can provide functionality. can provide similar kind of functionality in our mobile app using activities.if yes how , implications of same.
if don't kill activities, wouldn't create memory issues??
thanks..
yeah think pretty simple.
so if working android 2.0 there function,
there function in activity called, onbackpressed(). if have activities override , like:
public void onbackpressed() { intent intent = getintent(); myaccessablestoragefacility.storeforwardintent(intent); super.onbackpressed(); } public void oncreateoptionsmenu(menu menu) { menu.add("forward").setintent(myaccessablestoragefacility.getlastintent()); super.oncreateoptionsmenu(menu); }
if don't have android 2.0, override onkeypressed method instead of onbackpressed , keycode of button , write same code save last intent.
Comments
Post a Comment