Loading res/values/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -153,6 +153,7 @@ <!-- All applications label --> <string name="all_apps_button_label">Apps list</string> <string name="all_apps_search_results">Search results</string> <string name="all_apps_button_personal_label">Personal apps list</string> <string name="all_apps_button_work_label">Work apps list</string> Loading src/com/android/launcher3/allapps/AllAppsContainerView.java +14 −13 Original line number Diff line number Diff line Loading @@ -120,6 +120,7 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo protected boolean mUsingTabs; private boolean mIsSearching; private boolean mHasWorkApps; protected RecyclerViewFastScroller mTouchHandler; protected final Point mFastScrollerOffset = new Point(); Loading Loading @@ -191,7 +192,7 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo int currentPage = state.getInt(BUNDLE_KEY_CURRENT_PAGE, 0); if (currentPage != 0 && mViewPager != null) { mViewPager.setCurrentPage(currentPage); rebindAdapters(true); rebindAdapters(); } else { reset(true); } Loading Loading @@ -245,9 +246,10 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo break; } } mHasWorkApps = hasWorkApps; if (!mAH[AdapterHolder.MAIN].appsList.hasFilter()) { rebindAdapters(hasWorkApps); if (hasWorkApps) { rebindAdapters(); if (mHasWorkApps) { resetWorkProfile(); } } Loading Loading @@ -324,6 +326,8 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo mViewPager.getNextPage() == 0 ? R.string.all_apps_button_personal_label : R.string.all_apps_button_work_label; } else if (mIsSearching) { descriptionRes = R.string.all_apps_search_results; } else { descriptionRes = R.string.all_apps_button_label; } Loading Loading @@ -372,7 +376,7 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo }); mHeader = findViewById(R.id.all_apps_header); rebindAdapters(mUsingTabs, true /* force */); rebindAdapters(true /* force */); mSearchContainer = findViewById(R.id.search_container_all_apps); mSearchUiManager = (SearchUiManager) mSearchContainer; Loading Loading @@ -441,11 +445,12 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo } } private void rebindAdapters(boolean showTabs) { rebindAdapters(showTabs, false /* force */); private void rebindAdapters() { rebindAdapters(false /* force */); } protected void rebindAdapters(boolean showTabs, boolean force) { protected void rebindAdapters(boolean force) { boolean showTabs = mHasWorkApps && !mIsSearching; if (showTabs == mUsingTabs && !force) { return; } Loading Loading @@ -628,17 +633,13 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo mAH[i].adapter.setLastSearchQuery(query); } mIsSearching = true; if (mUsingTabs) { rebindAdapters(false); // hide tabs } rebindAdapters(); mHeader.setCollapsed(true); } public void onClearSearchResult() { if (mUsingTabs) { rebindAdapters(true); // show tabs } mIsSearching = false; rebindAdapters(); getActiveRecyclerView().scrollToTop(); } Loading src/com/android/launcher3/allapps/LauncherAllAppsContainerView.java +0 −11 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import android.view.MotionEvent; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherState; import com.android.launcher3.statemanager.StateManager.StateListener; /** * AllAppsContainerView with launcher specific callbacks Loading @@ -31,8 +30,6 @@ public class LauncherAllAppsContainerView extends AllAppsContainerView { private final Launcher mLauncher; private StateListener<LauncherState> mWorkTabListener; public LauncherAllAppsContainerView(Context context) { this(context, null); } Loading Loading @@ -74,14 +71,6 @@ public class LauncherAllAppsContainerView extends AllAppsContainerView { mLauncher.getAllAppsController().setScrollRangeDelta(allAppsStartingPositionY); } @Override public void setupHeader() { super.setupHeader(); if (mWorkTabListener != null && !mUsingTabs) { mLauncher.getStateManager().removeStateListener(mWorkTabListener); } } @Override public void onActivePageChanged(int currentActivePage) { super.onActivePageChanged(currentActivePage); Loading Loading
res/values/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -153,6 +153,7 @@ <!-- All applications label --> <string name="all_apps_button_label">Apps list</string> <string name="all_apps_search_results">Search results</string> <string name="all_apps_button_personal_label">Personal apps list</string> <string name="all_apps_button_work_label">Work apps list</string> Loading
src/com/android/launcher3/allapps/AllAppsContainerView.java +14 −13 Original line number Diff line number Diff line Loading @@ -120,6 +120,7 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo protected boolean mUsingTabs; private boolean mIsSearching; private boolean mHasWorkApps; protected RecyclerViewFastScroller mTouchHandler; protected final Point mFastScrollerOffset = new Point(); Loading Loading @@ -191,7 +192,7 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo int currentPage = state.getInt(BUNDLE_KEY_CURRENT_PAGE, 0); if (currentPage != 0 && mViewPager != null) { mViewPager.setCurrentPage(currentPage); rebindAdapters(true); rebindAdapters(); } else { reset(true); } Loading Loading @@ -245,9 +246,10 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo break; } } mHasWorkApps = hasWorkApps; if (!mAH[AdapterHolder.MAIN].appsList.hasFilter()) { rebindAdapters(hasWorkApps); if (hasWorkApps) { rebindAdapters(); if (mHasWorkApps) { resetWorkProfile(); } } Loading Loading @@ -324,6 +326,8 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo mViewPager.getNextPage() == 0 ? R.string.all_apps_button_personal_label : R.string.all_apps_button_work_label; } else if (mIsSearching) { descriptionRes = R.string.all_apps_search_results; } else { descriptionRes = R.string.all_apps_button_label; } Loading Loading @@ -372,7 +376,7 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo }); mHeader = findViewById(R.id.all_apps_header); rebindAdapters(mUsingTabs, true /* force */); rebindAdapters(true /* force */); mSearchContainer = findViewById(R.id.search_container_all_apps); mSearchUiManager = (SearchUiManager) mSearchContainer; Loading Loading @@ -441,11 +445,12 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo } } private void rebindAdapters(boolean showTabs) { rebindAdapters(showTabs, false /* force */); private void rebindAdapters() { rebindAdapters(false /* force */); } protected void rebindAdapters(boolean showTabs, boolean force) { protected void rebindAdapters(boolean force) { boolean showTabs = mHasWorkApps && !mIsSearching; if (showTabs == mUsingTabs && !force) { return; } Loading Loading @@ -628,17 +633,13 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo mAH[i].adapter.setLastSearchQuery(query); } mIsSearching = true; if (mUsingTabs) { rebindAdapters(false); // hide tabs } rebindAdapters(); mHeader.setCollapsed(true); } public void onClearSearchResult() { if (mUsingTabs) { rebindAdapters(true); // show tabs } mIsSearching = false; rebindAdapters(); getActiveRecyclerView().scrollToTop(); } Loading
src/com/android/launcher3/allapps/LauncherAllAppsContainerView.java +0 −11 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import android.view.MotionEvent; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherState; import com.android.launcher3.statemanager.StateManager.StateListener; /** * AllAppsContainerView with launcher specific callbacks Loading @@ -31,8 +30,6 @@ public class LauncherAllAppsContainerView extends AllAppsContainerView { private final Launcher mLauncher; private StateListener<LauncherState> mWorkTabListener; public LauncherAllAppsContainerView(Context context) { this(context, null); } Loading Loading @@ -74,14 +71,6 @@ public class LauncherAllAppsContainerView extends AllAppsContainerView { mLauncher.getAllAppsController().setScrollRangeDelta(allAppsStartingPositionY); } @Override public void setupHeader() { super.setupHeader(); if (mWorkTabListener != null && !mUsingTabs) { mLauncher.getStateManager().removeStateListener(mWorkTabListener); } } @Override public void onActivePageChanged(int currentActivePage) { super.onActivePageChanged(currentActivePage); Loading