diff options
author | 2013-04-17 23:59:41 -0700 | |
---|---|---|
committer | 2013-04-17 23:59:41 -0700 | |
commit | 64e87b3e660199b5dd7539fe413146e4dfbf977f (patch) | |
tree | 1a9427db419abff635ad245eefd013724ca6c9fd /java/src/com/android/inputmethod/compat/TextViewCompatUtils.java | |
parent | 8acab80a8680956038b45912d3e00a1d6a5e3cdb (diff) | |
parent | 0b2d184a426f49c115ea55098ae6073ccd7d6a94 (diff) | |
download | latinime-64e87b3e660199b5dd7539fe413146e4dfbf977f.tar.gz latinime-64e87b3e660199b5dd7539fe413146e4dfbf977f.tar.xz latinime-64e87b3e660199b5dd7539fe413146e4dfbf977f.zip |
am 0b2d184a: Merge "Update setup wizard icons"
* commit '0b2d184a426f49c115ea55098ae6073ccd7d6a94':
Update setup wizard icons
Diffstat (limited to 'java/src/com/android/inputmethod/compat/TextViewCompatUtils.java')
-rw-r--r-- | java/src/com/android/inputmethod/compat/TextViewCompatUtils.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/java/src/com/android/inputmethod/compat/TextViewCompatUtils.java b/java/src/com/android/inputmethod/compat/TextViewCompatUtils.java index d4f1ea830..f8e1902c0 100644 --- a/java/src/com/android/inputmethod/compat/TextViewCompatUtils.java +++ b/java/src/com/android/inputmethod/compat/TextViewCompatUtils.java @@ -22,23 +22,23 @@ import android.widget.TextView; import java.lang.reflect.Method; public final class TextViewCompatUtils { - // Note that TextView.setCompoundDrawablesRelative(Drawable,Drawable,Drawable,Drawable) has - // been introduced in API level 17 (Build.VERSION_CODE.JELLY_BEAN_MR1). - private static final Method METHOD_setCompoundDrawablesRelative = CompatUtils.getMethod( - TextView.class, "setCompoundDrawablesRelative", + // Note that TextView.setCompoundDrawablesRelativeWithIntrinsicBounds(Drawable,Drawable, + // Drawable,Drawable) has been introduced in API level 17 (Build.VERSION_CODE.JELLY_BEAN_MR1). + private static final Method METHOD_setCompoundDrawablesRelativeWithIntrinsicBounds = + CompatUtils.getMethod(TextView.class, "setCompoundDrawablesRelativeWithIntrinsicBounds", Drawable.class, Drawable.class, Drawable.class, Drawable.class); private TextViewCompatUtils() { // This utility class is not publicly instantiable. } - public static void setCompoundDrawablesRelative(final TextView textView, final Drawable start, - final Drawable top, final Drawable end, final Drawable bottom) { - if (METHOD_setCompoundDrawablesRelative == null) { - textView.setCompoundDrawables(start, top, end, bottom); + public static void setCompoundDrawablesRelativeWithIntrinsicBounds(final TextView textView, + final Drawable start, final Drawable top, final Drawable end, final Drawable bottom) { + if (METHOD_setCompoundDrawablesRelativeWithIntrinsicBounds == null) { + textView.setCompoundDrawablesWithIntrinsicBounds(start, top, end, bottom); return; } - CompatUtils.invoke(textView, null, METHOD_setCompoundDrawablesRelative, + CompatUtils.invoke(textView, null, METHOD_setCompoundDrawablesRelativeWithIntrinsicBounds, start, top, end, bottom); } } |