Unifying multiple all-apps implementations

> Using a single layout for the all-apps content
> Removing some unnecessary themes
> Fixing search chashes in SecondaryDisplayLauncher

Bug: 259733681
Test: Existing TAPL tests verify that Launcher/AllApps work properly
Change-Id: Icd5310316499cd421bc039cdbd4d398b813cd477
This commit is contained in:
Sunny Goyal
2022-12-09 12:37:25 -08:00
parent 80872f32da
commit adb364a104
18 changed files with 158 additions and 354 deletions

View File

@@ -17,6 +17,7 @@ package com.android.launcher3.taskbar.allapps;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.WindowInsets;
import com.android.launcher3.DeviceProfile;
@@ -42,6 +43,19 @@ public class TaskbarAllAppsContainerView extends
return super.onApplyWindowInsets(insets);
}
@Override
protected View inflateSearchBox() {
// Remove top padding of header, since we do not have any search
mHeader.setPadding(mHeader.getPaddingLeft(), 0,
mHeader.getPaddingRight(), mHeader.getPaddingBottom());
TaskbarAllAppsFallbackSearchContainer searchView =
new TaskbarAllAppsFallbackSearchContainer(getContext(), null);
searchView.setId(R.id.search_container_all_apps);
searchView.setVisibility(GONE);
return searchView;
}
@Override
protected boolean isSearchSupported() {
return false;
@@ -53,4 +67,10 @@ public class TaskbarAllAppsContainerView extends
// TODO(b/240670050): Remove this and add header protection for the taskbar entrypoint.
mBottomSheetBackground.setBackgroundResource(R.drawable.bg_rounded_corner_bottom_sheet);
}
@Override
public boolean isInAllApps() {
// All apps is always open
return true;
}
}