Expose action that allows landing on the work tab

Bug: 217385869
Bug: 203531272
Test: manual
Change-Id: I68a6add9f603105e0a2ee01ebdc3059e18c9a050
This commit is contained in:
kholoud mohamed
2022-02-03 15:44:25 +00:00
parent c1b94255cf
commit ceec31b17c
3 changed files with 20 additions and 0 deletions
@@ -331,6 +331,16 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte
return mViewPager.getNextPage() == 0;
}
/**
* Switches the current page to the provided {@code tab} if tabs are supported, otherwise does
* nothing.
*/
public void switchToTab(int tab) {
if (mUsingTabs) {
mViewPager.setCurrentPage(tab);
}
}
public LayoutInflater getLayoutInflater() {
return LayoutInflater.from(getContext());
}