Add work toggle to work apps paused message

This also fixes scrolling issues in landscape

Bug: 186857875
Bug: 161929312
Bug: 189983516
Bug: 190567199
screenshot: https://screenshot.googleplex.com/BCjcyJFqJo6W4Tr
Test: local
Change-Id: I7bcf23cc4be2fca936eba41342731789eb8f3292
This commit is contained in:
Samuel Fufa
2021-06-14 18:27:44 -05:00
parent b8cec440cc
commit dfc274364e
9 changed files with 172 additions and 61 deletions

View File

@@ -72,8 +72,13 @@ public class FloatingHeaderView extends LinearLayout implements
}
int current = -mCurrentRV.getCurrentScrollY();
boolean headerCollapsed = mHeaderCollapsed;
moved(current);
applyVerticalMove();
if (headerCollapsed != mHeaderCollapsed) {
AllAppsContainerView parent = (AllAppsContainerView) getParent();
parent.invalidateHeader();
}
}
};
@@ -219,6 +224,8 @@ public class FloatingHeaderView extends LinearLayout implements
mTabsHidden = tabsHidden;
mTabLayout.setVisibility(tabsHidden ? View.GONE : View.VISIBLE);
mTabLayout.getLayoutParams().width =
mAH[AllAppsContainerView.AdapterHolder.MAIN].recyclerView.getTabWidth();
mMainRV = setupRV(mMainRV, mAH[AllAppsContainerView.AdapterHolder.MAIN].recyclerView);
mWorkRV = setupRV(mWorkRV, mAH[AllAppsContainerView.AdapterHolder.WORK].recyclerView);
mParent = (ViewGroup) mMainRV.getParent();
@@ -429,6 +436,13 @@ public class FloatingHeaderView extends LinearLayout implements
}
return null;
}
/**
* Returns visible height of FloatingHeaderView contents
*/
public int getVisibleBottomBound() {
return getBottom() + mTranslationY;
}
}