tags:

views:

132

answers:

1

Hai Frnds, I want to implement back button functionality in my Android Application similar to the back button in the Browser but without using Intents.

I m going to view a sport listview, in that i click football listview , in that i click my favorite player listview, suppose if the user press back button in football listview then i have to diaplay sport listview.

A: 

As per your question, you have three listviews sport lv, football lv and player lv(here i am mentioned Listview as lv).My guess you are using the setVisibility() method to navigate from your sport lv to football lv and then player lv. these stuff done on the OnItemClickListener of you corresponding lv. Right? So you are hesitate reverse the process. you can do this onKeyDown() method. that is onKeyDown() override tht key event of the phone. If the keycode KEYCODE_BACK then you have set visibility of player lv as gone and football as visible. Thats it.

Praveen Chandrasekaran