Merge "[Search] Resolve work/personal tab overlap with A-Z list" into sc-dev am: c699c01812
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/13969496 Change-Id: Id322581e4aad3057e1946c7dc88d22cf64aa70e0
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
android:clipChildren="true"
|
||||
android:clipToPadding="false"
|
||||
android:descendantFocusability="afterDescendants"
|
||||
android:paddingTop="@dimen/all_apps_header_top_padding"
|
||||
launcher:pageIndicator="@+id/tabs" >
|
||||
|
||||
<include layout="@layout/all_apps_rv_layout" />
|
||||
|
||||
@@ -583,10 +583,6 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
|
||||
int padding = mHeader.getMaxTranslation();
|
||||
for (int i = 0; i < mAH.length; i++) {
|
||||
mAH[i].padding.top = padding;
|
||||
if (FeatureFlags.ENABLE_DEVICE_SEARCH.get() && mUsingTabs) {
|
||||
//add extra space between tabs and recycler view
|
||||
mAH[i].padding.top += mLauncher.getDeviceProfile().edgeMarginPx;
|
||||
}
|
||||
mAH[i].applyPadding();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,8 +23,6 @@ import android.util.AttributeSet;
|
||||
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.PagedView;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.workprofile.PersonalWorkPagedView;
|
||||
|
||||
/**
|
||||
@@ -43,10 +41,6 @@ public class AllAppsPagedView extends PersonalWorkPagedView {
|
||||
|
||||
public AllAppsPagedView(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
int topPadding = FeatureFlags.ENABLE_DEVICE_SEARCH.get() ? 0
|
||||
: context.getResources().getDimensionPixelOffset(
|
||||
R.dimen.all_apps_header_top_padding);
|
||||
setPadding(0, topPadding, 0, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -106,8 +106,8 @@ public class FloatingHeaderView extends LinearLayout implements
|
||||
|
||||
public FloatingHeaderView(@NonNull Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
mHeaderTopPadding = FeatureFlags.ENABLE_DEVICE_SEARCH.get() ? 0 :
|
||||
context.getResources().getDimensionPixelSize(R.dimen.all_apps_header_top_padding);
|
||||
mHeaderTopPadding = context.getResources()
|
||||
.getDimensionPixelSize(R.dimen.all_apps_header_top_padding);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -125,7 +125,6 @@ public class FloatingHeaderView extends LinearLayout implements
|
||||
}
|
||||
}
|
||||
mFixedRows = rows.toArray(new FloatingHeaderRow[rows.size()]);
|
||||
setPadding(0, mHeaderTopPadding, 0, 0);
|
||||
mAllRows = mFixedRows;
|
||||
}
|
||||
|
||||
@@ -243,9 +242,7 @@ public class FloatingHeaderView extends LinearLayout implements
|
||||
|
||||
public int getMaxTranslation() {
|
||||
if (mMaxTranslation == 0 && mTabsHidden) {
|
||||
int paddingOffset = getResources().getDimensionPixelSize(
|
||||
R.dimen.all_apps_search_bar_bottom_padding);
|
||||
return FeatureFlags.ENABLE_DEVICE_SEARCH.get() ? 0 : paddingOffset;
|
||||
return getResources().getDimensionPixelSize(R.dimen.all_apps_search_bar_bottom_padding);
|
||||
} else if (mMaxTranslation > 0 && mTabsHidden) {
|
||||
return mMaxTranslation + getPaddingTop();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user