Java 类android.support.v7.app.ActionBar.TabListener 实例源码
项目:android-shared
文件:ActionBarUtils.java
/**
* Configures the {@link ActionBar} to display navigation tabNames.
*
* @param actionBar the {@link ActionBar} to customize.
* @param names the collection of tab names.
* @param listener the {@link TabListener} to handle tab selection events.
*/
public static void configureTabNavigation(final ActionBar actionBar, final List<String> names,
final TabListener listener) {
if (listener == null) {
throw new IllegalArgumentException("TabListener must be supplied");
}
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
for (final String name : names) {
final Tab tab = actionBar.newTab();
tab.setTabListener(listener);
tab.setText(name);
actionBar.addTab(tab);
}
}
项目:boohee_v5.6
文件:WindowDecorActionBar.java
public TabListener getCallback() {
return this.mCallback;
}
项目:boohee_v5.6
文件:WindowDecorActionBar.java
public Tab setTabListener(TabListener callback) {
this.mCallback = callback;
return this;
}