diff options
author | 2013-04-18 06:56:24 +0000 | |
---|---|---|
committer | 2013-04-18 06:56:24 +0000 | |
commit | 0b2d184a426f49c115ea55098ae6073ccd7d6a94 (patch) | |
tree | 65abb5ef034b94667f90aac1e95edb4c1a8b5f93 /java/src/com/android/inputmethod/compat/TextViewCompatUtils.java | |
parent | 56f35a10cde1beeea51d99427992d832fa2de2bb (diff) | |
parent | d794f5ae2aee44b9ce75cd675cb7138cd9a4ea82 (diff) | |
download | latinime-0b2d184a426f49c115ea55098ae6073ccd7d6a94.tar.gz latinime-0b2d184a426f49c115ea55098ae6073ccd7d6a94.tar.xz latinime-0b2d184a426f49c115ea55098ae6073ccd7d6a94.zip |
Merge "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); } } |