Code example for ActionBar.Tab

Methods: getText

0
        } 
 
        @Override 
        public void onTabSelected(Tab tab, FragmentTransaction ft) {
            Log.i("", "" + Thread.currentThread().getId());
            CharSequence tabText = tab.getText();
            Log.i(TAG, tabText.toString());
            if(tabText.equals("Profile")) {
                ListProfileTask task = new ListProfileTask(activity,ft);
                task.execute();
            } else if (tabText.equals("Contacts")) {
                ListContactTask task = new ListContactTask(activity, ft);
                task.execute();
            } 
        } 
 
        @Override 
        public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction ft) {
 
        } 
    }