Merge "Apply tint when setting check mark drawable" into nyc-dev

This commit is contained in:
TreeHugger Robot
2016-04-26 17:17:02 +00:00
committed by Android (Google) Code Review

View File

@@ -185,11 +185,12 @@ public class CheckedTextView extends TextView implements Checkable {
d.setCallback(this); d.setCallback(this);
d.setVisible(getVisibility() == VISIBLE, false); d.setVisible(getVisibility() == VISIBLE, false);
d.setState(CHECKED_STATE_SET); d.setState(CHECKED_STATE_SET);
setMinHeight(d.getIntrinsicHeight());
// Record the intrinsic dimensions when in "checked" state.
setMinHeight(d.getIntrinsicHeight());
mCheckMarkWidth = d.getIntrinsicWidth(); mCheckMarkWidth = d.getIntrinsicWidth();
d.setState(getDrawableState()); d.setState(getDrawableState());
applyCheckMarkTint();
} else { } else {
mCheckMarkWidth = 0; mCheckMarkWidth = 0;
} }
@@ -197,6 +198,8 @@ public class CheckedTextView extends TextView implements Checkable {
mCheckMarkDrawable = d; mCheckMarkDrawable = d;
mCheckMarkResource = resId; mCheckMarkResource = resId;
applyCheckMarkTint();
// Do padding resolution. This will call internalSetPadding() and do a // Do padding resolution. This will call internalSetPadding() and do a
// requestLayout() if needed. // requestLayout() if needed.
resolvePadding(); resolvePadding();