mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Changing the overviewState to show appsearch and floating header
Change-Id: I2cfd61cfc9978e4c8e4520f0f7217e49e7344c79
This commit is contained in:
@@ -217,14 +217,14 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
|
||||
/**
|
||||
* Resets the state of AllApps.
|
||||
*/
|
||||
public void reset() {
|
||||
public void reset(boolean animate) {
|
||||
for (int i = 0; i < mAH.length; i++) {
|
||||
if (mAH[i].recyclerView != null) {
|
||||
mAH[i].recyclerView.scrollToTop();
|
||||
}
|
||||
}
|
||||
if (isHeaderVisible()) {
|
||||
mHeader.reset();
|
||||
mHeader.reset(animate);
|
||||
}
|
||||
// Reset the search bar and base recycler view after transitioning home
|
||||
mSearchUiManager.resetSearch();
|
||||
@@ -360,7 +360,7 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
|
||||
|
||||
public void onTabChanged(int pos) {
|
||||
mHeader.setMainActive(pos == 0);
|
||||
reset();
|
||||
reset(true /* animate */);
|
||||
if (mAH[pos].recyclerView != null) {
|
||||
mAH[pos].recyclerView.bindFastScrollbar();
|
||||
|
||||
@@ -383,6 +383,18 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
|
||||
return mHeader;
|
||||
}
|
||||
|
||||
public View getSearchView() {
|
||||
return mSearchContainer;
|
||||
}
|
||||
|
||||
public View getContentView() {
|
||||
return mViewPager == null ? getActiveRecyclerView() : mViewPager;
|
||||
}
|
||||
|
||||
public RecyclerViewFastScroller getScrollBar() {
|
||||
return getActiveRecyclerView().getScrollbar();
|
||||
}
|
||||
|
||||
public void setupHeader() {
|
||||
mHeader.setVisibility(View.VISIBLE);
|
||||
mHeader.setup(mAH, mAH[AllAppsContainerView.AdapterHolder.WORK].recyclerView == null);
|
||||
|
||||
Reference in New Issue
Block a user