Refine all apps tabs alignment & remove ripple effect from tabs

Test: Open all apps and observe the position of tabs alignment.
       Click a tab and observe the fade in color effect.
Fix: 191387242
Change-Id: Ie23a092268ce62eba29059eb5bd266a46ca652a5
This commit is contained in:
Steven Ng
2021-06-23 23:05:27 +01:00
parent 93068d1c39
commit be2dc65f08
3 changed files with 15 additions and 13 deletions

View File

@@ -154,6 +154,14 @@ public class FloatingHeaderView extends LinearLayout implements
PluginManagerWrapper.INSTANCE.get(getContext()).removePluginListener(this);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
if (mMainRV != null) {
mTabLayout.getLayoutParams().width = mMainRV.getTabWidth();
}
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
private void recreateAllRowsArray() {
int pluginCount = mPluginRows.size();
if (pluginCount == 0) {
@@ -224,8 +232,6 @@ 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();