Loading res/layout/all_apps_tabs.xml +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ android:clipChildren="true" android:clipToPadding="false" android:descendantFocusability="afterDescendants" android:paddingTop="@dimen/all_apps_header_top_padding" android:paddingTop="@dimen/all_apps_paged_view_top_padding" launcher:pageIndicator="@+id/tabs" > <include layout="@layout/all_apps_rv_layout" /> Loading res/values/dimens.xml +4 −1 Original line number Diff line number Diff line Loading @@ -111,7 +111,9 @@ <dimen name="all_apps_tabs_indicator_height">2dp</dimen> <dimen name="all_apps_header_top_margin">33dp</dimen> <dimen name="all_apps_header_top_padding">36dp</dimen> <dimen name="all_apps_header_bottom_padding">6dp</dimen> <dimen name="all_apps_header_bottom_padding">14dp</dimen> <dimen name="all_apps_header_top_adjustment">6dp</dimen> <dimen name="all_apps_header_bottom_adjustment">4dp</dimen> <dimen name="all_apps_work_profile_tab_footer_top_padding">16dp</dimen> <dimen name="all_apps_work_profile_tab_footer_bottom_padding">20dp</dimen> <dimen name="all_apps_tabs_button_horizontal_padding">4dp</dimen> Loading @@ -122,6 +124,7 @@ <dimen name="all_apps_tip_bottom_margin">8dp</dimen> <dimen name="all_apps_height_extra">6dp</dimen> <dimen name="all_apps_bottom_sheet_horizontal_padding">0dp</dimen> <dimen name="all_apps_paged_view_top_padding">40dp</dimen> <!-- The size of corner radius of the arrow in the arrow toast. --> <dimen name="arrow_toast_corner_radius">2dp</dimen> Loading src/com/android/launcher3/allapps/FloatingHeaderView.java +13 −5 Original line number Diff line number Diff line Loading @@ -82,6 +82,9 @@ public class FloatingHeaderView extends LinearLayout implements protected final Map<AllAppsRow, PluginHeaderRow> mPluginRows = new ArrayMap<>(); private final int mHeaderTopPadding; // These two values are necessary to ensure that the header protection is drawn correctly. private final int mHeaderTopAdjustment; private final int mHeaderBottomAdjustment; private final boolean mHeaderProtectionSupported; protected ViewGroup mTabLayout; Loading Loading @@ -118,6 +121,10 @@ public class FloatingHeaderView extends LinearLayout implements super(context, attrs); mHeaderTopPadding = context.getResources() .getDimensionPixelSize(R.dimen.all_apps_header_top_padding); mHeaderTopAdjustment = context.getResources() .getDimensionPixelSize(R.dimen.all_apps_header_top_adjustment); mHeaderBottomAdjustment = context.getResources() .getDimensionPixelSize(R.dimen.all_apps_header_bottom_adjustment); mHeaderProtectionSupported = context.getResources().getBoolean( R.bool.config_header_protection_supported) // TODO(b/208599118) Support header protection for bottom sheet. Loading Loading @@ -255,6 +262,9 @@ public class FloatingHeaderView extends LinearLayout implements for (FloatingHeaderRow row : mAllRows) { mMaxTranslation += row.getExpectedHeight(); } if (!mTabsHidden) { mMaxTranslation += mHeaderBottomAdjustment; } } public void setMainActive(boolean active) { Loading Loading @@ -317,9 +327,9 @@ public class FloatingHeaderView extends LinearLayout implements mTabLayout.setTranslationY(mTranslationY); int clipHeight = mHeaderTopPadding - getPaddingBottom(); mRVClip.top = mTabsHidden ? clipHeight : 0; mHeaderClip.top = clipHeight; int clipTop = mHeaderTopPadding - mHeaderTopAdjustment; mRVClip.top = mTabsHidden ? clipTop : 0; mHeaderClip.top = clipTop; // clipping on a draw might cause additional redraw setClipBounds(mHeaderClip); mMainRV.setClipBounds(mRVClip); Loading Loading @@ -447,5 +457,3 @@ public class FloatingHeaderView extends LinearLayout implements return Math.max(getHeight() - getPaddingTop() + mTranslationY, 0); } } Loading
res/layout/all_apps_tabs.xml +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ android:clipChildren="true" android:clipToPadding="false" android:descendantFocusability="afterDescendants" android:paddingTop="@dimen/all_apps_header_top_padding" android:paddingTop="@dimen/all_apps_paged_view_top_padding" launcher:pageIndicator="@+id/tabs" > <include layout="@layout/all_apps_rv_layout" /> Loading
res/values/dimens.xml +4 −1 Original line number Diff line number Diff line Loading @@ -111,7 +111,9 @@ <dimen name="all_apps_tabs_indicator_height">2dp</dimen> <dimen name="all_apps_header_top_margin">33dp</dimen> <dimen name="all_apps_header_top_padding">36dp</dimen> <dimen name="all_apps_header_bottom_padding">6dp</dimen> <dimen name="all_apps_header_bottom_padding">14dp</dimen> <dimen name="all_apps_header_top_adjustment">6dp</dimen> <dimen name="all_apps_header_bottom_adjustment">4dp</dimen> <dimen name="all_apps_work_profile_tab_footer_top_padding">16dp</dimen> <dimen name="all_apps_work_profile_tab_footer_bottom_padding">20dp</dimen> <dimen name="all_apps_tabs_button_horizontal_padding">4dp</dimen> Loading @@ -122,6 +124,7 @@ <dimen name="all_apps_tip_bottom_margin">8dp</dimen> <dimen name="all_apps_height_extra">6dp</dimen> <dimen name="all_apps_bottom_sheet_horizontal_padding">0dp</dimen> <dimen name="all_apps_paged_view_top_padding">40dp</dimen> <!-- The size of corner radius of the arrow in the arrow toast. --> <dimen name="arrow_toast_corner_radius">2dp</dimen> Loading
src/com/android/launcher3/allapps/FloatingHeaderView.java +13 −5 Original line number Diff line number Diff line Loading @@ -82,6 +82,9 @@ public class FloatingHeaderView extends LinearLayout implements protected final Map<AllAppsRow, PluginHeaderRow> mPluginRows = new ArrayMap<>(); private final int mHeaderTopPadding; // These two values are necessary to ensure that the header protection is drawn correctly. private final int mHeaderTopAdjustment; private final int mHeaderBottomAdjustment; private final boolean mHeaderProtectionSupported; protected ViewGroup mTabLayout; Loading Loading @@ -118,6 +121,10 @@ public class FloatingHeaderView extends LinearLayout implements super(context, attrs); mHeaderTopPadding = context.getResources() .getDimensionPixelSize(R.dimen.all_apps_header_top_padding); mHeaderTopAdjustment = context.getResources() .getDimensionPixelSize(R.dimen.all_apps_header_top_adjustment); mHeaderBottomAdjustment = context.getResources() .getDimensionPixelSize(R.dimen.all_apps_header_bottom_adjustment); mHeaderProtectionSupported = context.getResources().getBoolean( R.bool.config_header_protection_supported) // TODO(b/208599118) Support header protection for bottom sheet. Loading Loading @@ -255,6 +262,9 @@ public class FloatingHeaderView extends LinearLayout implements for (FloatingHeaderRow row : mAllRows) { mMaxTranslation += row.getExpectedHeight(); } if (!mTabsHidden) { mMaxTranslation += mHeaderBottomAdjustment; } } public void setMainActive(boolean active) { Loading Loading @@ -317,9 +327,9 @@ public class FloatingHeaderView extends LinearLayout implements mTabLayout.setTranslationY(mTranslationY); int clipHeight = mHeaderTopPadding - getPaddingBottom(); mRVClip.top = mTabsHidden ? clipHeight : 0; mHeaderClip.top = clipHeight; int clipTop = mHeaderTopPadding - mHeaderTopAdjustment; mRVClip.top = mTabsHidden ? clipTop : 0; mHeaderClip.top = clipTop; // clipping on a draw might cause additional redraw setClipBounds(mHeaderClip); mMainRV.setClipBounds(mRVClip); Loading Loading @@ -447,5 +457,3 @@ public class FloatingHeaderView extends LinearLayout implements return Math.max(getHeight() - getPaddingTop() + mTranslationY, 0); } }