am 15e7b2ac: Merge "Translate compound button drawable by scroll position" into lmp-dev
* commit '15e7b2ac60b0e6355e6ed5c1be676744c23f5a0e': Translate compound button drawable by scroll position
This commit is contained in:
@@ -398,7 +398,15 @@ public abstract class CompoundButton extends Button implements Checkable {
|
||||
super.onDraw(canvas);
|
||||
|
||||
if (buttonDrawable != null) {
|
||||
buttonDrawable.draw(canvas);
|
||||
final int scrollX = mScrollX;
|
||||
final int scrollY = mScrollY;
|
||||
if (scrollX == 0 && scrollY == 0) {
|
||||
buttonDrawable.draw(canvas);
|
||||
} else {
|
||||
canvas.translate(scrollX, scrollY);
|
||||
buttonDrawable.draw(canvas);
|
||||
canvas.translate(-scrollX, -scrollY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,6 @@
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSmall"
|
||||
android:textColor="?android:attr/textColorAlertDialogListItem"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="16dip"
|
||||
android:paddingEnd="16dip"
|
||||
android:paddingStart="@dimen/alert_dialog_padding_material"
|
||||
android:paddingEnd="@dimen/alert_dialog_padding_material"
|
||||
android:ellipsize="marquee" />
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="?android:attr/textColorAlertDialogListItem"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="16dip"
|
||||
android:paddingEnd="16dip"
|
||||
android:paddingStart="@dimen/alert_dialog_padding_material"
|
||||
android:paddingEnd="@dimen/alert_dialog_padding_material"
|
||||
android:checkMark="?android:attr/listChoiceIndicatorMultiple"
|
||||
android:checkMarkGravity="start"
|
||||
android:ellipsize="marquee" />
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="?android:attr/textColorAlertDialogListItem"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="16dip"
|
||||
android:paddingEnd="16dip"
|
||||
android:paddingStart="@dimen/alert_dialog_padding_material"
|
||||
android:paddingEnd="@dimen/alert_dialog_padding_material"
|
||||
android:checkMark="?android:attr/listChoiceIndicatorSingle"
|
||||
android:checkMarkGravity="start"
|
||||
android:ellipsize="marquee" />
|
||||
|
||||
Reference in New Issue
Block a user