mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-18 18:28:20 +00:00
Merge "[NexusLauncher] Expose setLayoutHorizontal." into udc-qpr-dev am: ceab9a2c85
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24156948 Change-Id: Ifcd0e290e43f410158c9174cb69cbe2743fc4cd3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -152,7 +152,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
|
||||
|
||||
private final CheckLongPressHelper mLongPressHelper;
|
||||
|
||||
private final boolean mLayoutHorizontal;
|
||||
private boolean mLayoutHorizontal;
|
||||
private final boolean mIsRtl;
|
||||
private final int mIconSize;
|
||||
|
||||
@@ -665,6 +665,18 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether the layout is horizontal.
|
||||
*/
|
||||
public void setLayoutHorizontal(boolean layoutHorizontal) {
|
||||
if (mLayoutHorizontal == layoutHorizontal) {
|
||||
return;
|
||||
}
|
||||
|
||||
mLayoutHorizontal = layoutHorizontal;
|
||||
applyCompoundDrawables(getIconOrTransparentColor());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether to vertically center the content.
|
||||
*/
|
||||
@@ -991,10 +1003,14 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
|
||||
if (!mIsIconVisible) {
|
||||
resetIconScale();
|
||||
}
|
||||
Drawable icon = visible ? mIcon : new ColorDrawable(Color.TRANSPARENT);
|
||||
Drawable icon = getIconOrTransparentColor();
|
||||
applyCompoundDrawables(icon);
|
||||
}
|
||||
|
||||
private Drawable getIconOrTransparentColor() {
|
||||
return mIsIconVisible ? mIcon : new ColorDrawable(Color.TRANSPARENT);
|
||||
}
|
||||
|
||||
/** Sets the icon visual state to disabled or not. */
|
||||
public void setIconDisabled(boolean isDisabled) {
|
||||
if (mIcon != null) {
|
||||
|
||||
Reference in New Issue
Block a user