Use compound drawable instead of image span.

Bug: 27263531
Change-Id: Id35342c6656cd4b0f4b1756c903e9cf071293a14
This commit is contained in:
Sudheer Shanka
2016-03-07 13:13:22 -08:00
parent 407e10e25f
commit f271fd5199

View File

@@ -651,8 +651,11 @@ public class RestrictedLockUtils {
final int disabledColor = context.getColor(R.color.disabled_text_color);
sb.setSpan(new ForegroundColorSpan(disabledColor), 0, sb.length(),
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
final ImageSpan image = new RestrictedLockImageSpan(context);
sb.append(" ", image, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
textView.setCompoundDrawables(null, null, getRestrictedPadlock(context), null);
textView.setCompoundDrawablePadding(context.getResources().getDimensionPixelSize(
R.dimen.restricted_icon_padding));
} else {
textView.setCompoundDrawables(null, null, null, null);
}
textView.setText(sb);
}