mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 16:26:47 +00:00
Reduces search clipping when work profile is not present.
Basically, adds the spacing that is otherwise included by the tab protection (which is about 4dp less than the spacing that was previously being added). Adds a compile-time flag to render the header at all times to help visualize issues like this in the future. Check the screenshots below to see some examples of this. Screenshots: https://drive.google.com/drive/folders/1n4wwtjMwOR-eDIE1xAoG3oLXO7txpoT_?resourcekey=0-WP0RNbp7vFh2Yw1wUBZTaA&usp=sharing Bug: 240672593 Bug: 243728487 Test: Manually checked search transition, scrolling behavior, and highlight of the search results with and without a work profile. Change-Id: I166d136e568c5621c81378fa09021666d95f0ffc
This commit is contained in:
@@ -277,7 +277,7 @@ public class FloatingHeaderView extends LinearLayout implements
|
||||
}
|
||||
}
|
||||
|
||||
public int getMaxTranslation() {
|
||||
int getMaxTranslation() {
|
||||
if (mMaxTranslation == 0 && (mTabsHidden || mFloatingRowsCollapsed)) {
|
||||
return getResources().getDimensionPixelSize(R.dimen.all_apps_search_bar_bottom_padding);
|
||||
} else if (mMaxTranslation > 0 && mTabsHidden) {
|
||||
@@ -334,7 +334,8 @@ public class FloatingHeaderView extends LinearLayout implements
|
||||
|
||||
int clipTop = getPaddingTop() - mTabsAdditionalPaddingTop;
|
||||
if (mTabsHidden) {
|
||||
clipTop += getPaddingBottom() - mTabsAdditionalPaddingBottom;
|
||||
// Add back spacing that is otherwise covered by the tabs.
|
||||
clipTop += mTabsAdditionalPaddingTop;
|
||||
}
|
||||
mRVClip.top = mTabsHidden || mFloatingRowsCollapsed ? clipTop : 0;
|
||||
mHeaderClip.top = clipTop;
|
||||
@@ -405,6 +406,10 @@ public class FloatingHeaderView extends LinearLayout implements
|
||||
return mFloatingRowsHeight;
|
||||
}
|
||||
|
||||
int getTabsAdditionalPaddingTop() {
|
||||
return mTabsAdditionalPaddingTop;
|
||||
}
|
||||
|
||||
int getTabsAdditionalPaddingBottom() {
|
||||
return mTabsAdditionalPaddingBottom;
|
||||
}
|
||||
@@ -473,7 +478,7 @@ public class FloatingHeaderView extends LinearLayout implements
|
||||
/**
|
||||
* Returns visible height of FloatingHeaderView contents requiring header protection
|
||||
*/
|
||||
public int getPeripheralProtectionHeight() {
|
||||
int getPeripheralProtectionHeight() {
|
||||
if (!mHeaderProtectionSupported) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user