Lines Matching refs:Tab
90 /** Updates the user interface to reflect the selected tab from the backing model. */
124 /** The container that stores the tab headers. */
170 final UiDataModel.Tab tabModel = UiDataModel.getUiDataModel().getTab(i);
173 final TabLayout.Tab tab = mTabLayout.newTab()
179 tab.setText(labelResId);
180 tab.setCustomView(R.layout.tab_item);
183 final TextView text = (TextView) tab.getCustomView()
188 final Drawable icon = tab.getIcon();
191 tab.setIcon(null);
198 mTabLayout.addTab(tab);
289 // Mirror changes made to the selected tab into UiDataModel.
292 public void onTabSelected(TabLayout.Tab tab) {
293 UiDataModel.getUiDataModel().setSelectedTab((UiDataModel.Tab) tab.getTag());
297 public void onTabUnselected(TabLayout.Tab tab) {
301 public void onTabReselected(TabLayout.Tab tab) {
305 // Honor changes to the selected tab from outside entities.
324 // ViewPager does not save state; this honors the selected tab in the user interface.
402 * Listens for keyboard activity for the tab fragments to handle if necessary. A tab may want to
466 * selected tab.
469 // Fetch the selected tab from the source of truth: UiDataModel.
470 final UiDataModel.Tab selectedTab = UiDataModel.getUiDataModel().getSelectedTab();
472 // Update the selected tab in the tablayout if it does not agree with UiDataModel.
474 final TabLayout.Tab tab = mTabLayout.getTabAt(i);
475 if (tab != null && tab.getTag() == selectedTab && !tab.isSelected()) {
476 tab.select();
501 final UiDataModel.Tab selectedTab = UiDataModel.getUiDataModel().getSelectedTab();
513 * As the view pager changes the selected page, update the model to record the new selected tab.
532 // The user has tapped a tab button; play the hide and show animations linearly.
537 // The user has interrupted settling on a tab and the fab button must be re-hidden.
645 * As the model reports changes to the selected tab, update the user interface.
649 public void selectedTabChanged(UiDataModel.Tab oldSelectedTab,
650 UiDataModel.Tab newSelectedTab) {
651 // Update the view pager and tab layout to agree with the model.
654 // Avoid sending events for the initial tab selection on launch and re-selecting a tab
674 // new tab is known. Otherwise they are updated at the end of the hide animation.