Add home settings toggle featureflag for enablingTwoLineText
- Have shouldUseTwoLine() be decided with the home settings toggle value bug:316027081 spec: https://www.figma.com/file/uMzPkNMZpb7EyfHDo8usIa/V-%E2%80%A2-Toast-Butter?type=design&node-id=405-384593&mode=design&t=UBkdeuNlAdRh2FGU-0 Test: Video: https://drive.google.com/file/d/15VUhNVro2fiwv3SzMda1StiPb3PV1eMT/view?usp=sharing before searchPreferenceScreen: https://screenshot.googleplex.com/3uqdMsZoGSBYb6c after searchPreferenceScreen: https://drive.google.com/file/d/15dswiHRTnafyhgQA_tL2tRc7vHFWdHbZ/view?usp=sharing before homeSettingsPage: https://screenshot.googleplex.com/7wsNevxGun2KCCB after homeSettingsPage: https://drive.google.com/file/d/15m5bjEyewlNHI_h26aygHa7zrgZ5qDF6/view?usp=sharing AppListSettingsPage: https://drive.google.com/file/d/15hl4ScHBOLgKv3M38HtatMxQw85pgl7t/view?usp=sharing Flag: enableTwolineToggle DEVELOPMENT Change-Id: I3ad133dd51dcb97e14ccded730e7737c5049261a
This commit is contained in:
1 parent
0f1c6dedf5
commit
5787a2710c
7 files changed
+35
-14
No files matched your search
@@ -31,6 +31,7 @@ import com.android.launcher3.BubbleTextView;
|
||||
import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener;
|
||||
import com.android.launcher3.Flags;
|
||||
import com.android.launcher3.LauncherPrefs;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.allapps.FloatingHeaderRow;
|
||||
@@ -137,7 +138,9 @@ public class PredictionRowView<T extends Context & ActivityContext>
|
||||
int totalHeight = iconHeight + iconPadding + textHeight + mVerticalPadding * 2;
|
||||
// Prediction row height will be 4dp bigger than the regular apps in A-Z list when two line
|
||||
// is not enabled. Otherwise, the extra height will increase by just the textHeight.
|
||||
int extraHeight = FeatureFlags.enableTwolineAllapps() ? textHeight : mTopRowExtraHeight;
|
||||
int extraHeight = (FeatureFlags.enableTwolineAllapps() && (!Flags.enableTwolineToggle()
|
||||
|| (Flags.enableTwolineToggle() && LauncherPrefs.ENABLE_TWOLINE_ALLAPPS_TOGGLE.get(
|
||||
getContext())))) ? textHeight : mTopRowExtraHeight;
|
||||
totalHeight += extraHeight;
|
||||
return getVisibility() == GONE ? 0 : totalHeight + getPaddingTop() + getPaddingBottom();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user