Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for(int t = 0; t < tabHost.getTabWidget().getChildCount(); t++){
- View child = tabHost.getTabWidget().getChildAt(t);
- String tag = (String) child.getTag();
- if(tag != null) {
- if(tag.equals("TAB1")) {
- child.setOnClickListener(new OnClickListener() {
- tabHost.setCurrentTab(0);
- }
- });
- } else if(tag.equals("TAB2")) {
- child.setOnClickListener(new OnClickListener() {
- tabHost.setCurrentTab(1);
- }
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement