Merge "Expose action that allows landing on the work tab"

This commit is contained in:
Kholoud Mohamed authored and Android (Google) Code Review committed 2022-02-08 17:12:18 +00:00
commit 6974d39a44
3 files changed
+20

No files matched your search

@@ -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());
}