here i need to disply same tabbar in all activities.my tabbar conatain 4 tabs home,contact,callus,about.inside tabs again i have some buttons.here tabbar working fine.but when i run the app that time tabbar displyed in bottom at the same time inside firsttab(home) wich funs(like buttons what ever) is there that also displyed.but in my when i click the home tab that time only i need to disply home tab functionalities. so i dont know how to remove default veiw of tabbar. can u any one knows suggest me.
Asked
Active
Viewed 401 times
1
-
2Just take a look at [this](http://stackoverflow.com/questions/2677698/android-iphone-style-tabhost/6992662#6992662) – Praveenkumar Feb 13 '12 at 06:40
1 Answers
1
See this example: Here it it
Edited:
Just replace the code:
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
//preventing default implementation previous to android.os.Build.VERSION_CODES.ECLAIR
return true;
}
return super.onKeyDown(keyCode, event);
}
with the code:
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
//preventing default implementation previous to android.os.Build.VERSION_CODES.ECLAIR
finish();
return true;
}
return super.onKeyDown(keyCode, event);
}
After that back Button will work.
Hope it will help you. :)

Shreyash Mahajan
- 23,386
- 35
- 116
- 188
-
in wich activity i extendes ActivityGroup.in that activty back button is not working. – user1089640 Feb 13 '12 at 09:48
-
Please follow the instruction explain on that link and it will realy going to help you. – Shreyash Mahajan Feb 13 '12 at 10:00
-
previously back button not working.now when i set the finish() back button working. i click back button means application destroyed.but when i click back button,i need to go previous page. – user1089640 Feb 13 '12 at 10:17
-
Have you implemented that example ? Its working as you want. Iy there is any view that you have previously view in perticular tab then it will neviget to that view and if the current display view is the first view then it will finish the activity. Hope you got my point. Please read carefully the instruction on that link and follow the steps for your view. – Shreyash Mahajan Feb 13 '12 at 11:01
-
let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/7613/discussion-between-user1089640-and-idroid-explorer) – user1089640 Feb 13 '12 at 11:17