diff options
author | 2013-04-18 12:13:08 +0900 | |
---|---|---|
committer | 2013-04-18 13:15:53 +0900 | |
commit | d794f5ae2aee44b9ce75cd675cb7138cd9a4ea82 (patch) | |
tree | 9923185b3b0c4cfd1556488f44c7a96c05b3b3c1 | |
parent | a19133011a1cbeb7a811a59d341c0fe65ba96001 (diff) | |
download | latinime-d794f5ae2aee44b9ce75cd675cb7138cd9a4ea82.tar.gz latinime-d794f5ae2aee44b9ce75cd675cb7138cd9a4ea82.tar.xz latinime-d794f5ae2aee44b9ce75cd675cb7138cd9a4ea82.zip |
Update setup wizard icons
Bug: 8159728
Change-Id: Ia5a14a35292b43dc1eaa2d4edd65134040355149
26 files changed, 11 insertions, 13 deletions
diff --git a/java/res/drawable-hdpi/unbundled_check_01.png b/java/res/drawable-hdpi/unbundled_check_01.png Binary files differindex 8234399d5..42cce2f0f 100644 --- a/java/res/drawable-hdpi/unbundled_check_01.png +++ b/java/res/drawable-hdpi/unbundled_check_01.png diff --git a/java/res/drawable-hdpi/unbundled_check_02.png b/java/res/drawable-hdpi/unbundled_check_02.png Binary files differindex 6ccd07b55..dcd120eac 100644 --- a/java/res/drawable-hdpi/unbundled_check_02.png +++ b/java/res/drawable-hdpi/unbundled_check_02.png diff --git a/java/res/drawable-hdpi/unbundled_earth_01.png b/java/res/drawable-hdpi/unbundled_earth_01.png Binary files differindex 3d22f3bfc..4a0f087ed 100644 --- a/java/res/drawable-hdpi/unbundled_earth_01.png +++ b/java/res/drawable-hdpi/unbundled_earth_01.png diff --git a/java/res/drawable-hdpi/unbundled_earth_02.png b/java/res/drawable-hdpi/unbundled_earth_02.png Binary files differindex 1998aea56..f4bd421f2 100644 --- a/java/res/drawable-hdpi/unbundled_earth_02.png +++ b/java/res/drawable-hdpi/unbundled_earth_02.png diff --git a/java/res/drawable-hdpi/unbundled_key_01.png b/java/res/drawable-hdpi/unbundled_key_01.png Binary files differindex 84591ecb7..87c9e2c9b 100644 --- a/java/res/drawable-hdpi/unbundled_key_01.png +++ b/java/res/drawable-hdpi/unbundled_key_01.png diff --git a/java/res/drawable-hdpi/unbundled_key_02.png b/java/res/drawable-hdpi/unbundled_key_02.png Binary files differindex f366e524c..0747384b4 100644 --- a/java/res/drawable-hdpi/unbundled_key_02.png +++ b/java/res/drawable-hdpi/unbundled_key_02.png diff --git a/java/res/drawable-hdpi/unbundled_select_01.png b/java/res/drawable-hdpi/unbundled_select_01.png Binary files differindex 3887fe491..bb3de2f35 100644 --- a/java/res/drawable-hdpi/unbundled_select_01.png +++ b/java/res/drawable-hdpi/unbundled_select_01.png diff --git a/java/res/drawable-hdpi/unbundled_select_02.png b/java/res/drawable-hdpi/unbundled_select_02.png Binary files differindex 6a99b6b09..e56fdab97 100644 --- a/java/res/drawable-hdpi/unbundled_select_02.png +++ b/java/res/drawable-hdpi/unbundled_select_02.png diff --git a/java/res/drawable-mdpi/unbundled_check_01.png b/java/res/drawable-mdpi/unbundled_check_01.png Binary files differnew file mode 100644 index 000000000..d0d02a368 --- /dev/null +++ b/java/res/drawable-mdpi/unbundled_check_01.png diff --git a/java/res/drawable-mdpi/unbundled_check_02.png b/java/res/drawable-mdpi/unbundled_check_02.png Binary files differnew file mode 100644 index 000000000..d34fa2297 --- /dev/null +++ b/java/res/drawable-mdpi/unbundled_check_02.png diff --git a/java/res/drawable-mdpi/unbundled_earth_01.png b/java/res/drawable-mdpi/unbundled_earth_01.png Binary files differnew file mode 100644 index 000000000..ba60181ac --- /dev/null +++ b/java/res/drawable-mdpi/unbundled_earth_01.png diff --git a/java/res/drawable-mdpi/unbundled_earth_02.png b/java/res/drawable-mdpi/unbundled_earth_02.png Binary files differnew file mode 100644 index 000000000..9c5263864 --- /dev/null +++ b/java/res/drawable-mdpi/unbundled_earth_02.png diff --git a/java/res/drawable-mdpi/unbundled_key_01.png b/java/res/drawable-mdpi/unbundled_key_01.png Binary files differnew file mode 100644 index 000000000..8cd72dbd5 --- /dev/null +++ b/java/res/drawable-mdpi/unbundled_key_01.png diff --git a/java/res/drawable-mdpi/unbundled_key_02.png b/java/res/drawable-mdpi/unbundled_key_02.png Binary files differnew file mode 100644 index 000000000..4ef6e0cb7 --- /dev/null +++ b/java/res/drawable-mdpi/unbundled_key_02.png diff --git a/java/res/drawable-mdpi/unbundled_select_01.png b/java/res/drawable-mdpi/unbundled_select_01.png Binary files differnew file mode 100644 index 000000000..9ab008a46 --- /dev/null +++ b/java/res/drawable-mdpi/unbundled_select_01.png diff --git a/java/res/drawable-mdpi/unbundled_select_02.png b/java/res/drawable-mdpi/unbundled_select_02.png Binary files differnew file mode 100644 index 000000000..8af807b2d --- /dev/null +++ b/java/res/drawable-mdpi/unbundled_select_02.png diff --git a/java/res/drawable-xhdpi/unbundled_check_01.png b/java/res/drawable-xhdpi/unbundled_check_01.png Binary files differnew file mode 100644 index 000000000..1300a7f5b --- /dev/null +++ b/java/res/drawable-xhdpi/unbundled_check_01.png diff --git a/java/res/drawable-xhdpi/unbundled_check_02.png b/java/res/drawable-xhdpi/unbundled_check_02.png Binary files differnew file mode 100644 index 000000000..715188656 --- /dev/null +++ b/java/res/drawable-xhdpi/unbundled_check_02.png diff --git a/java/res/drawable-xhdpi/unbundled_earth_01.png b/java/res/drawable-xhdpi/unbundled_earth_01.png Binary files differnew file mode 100644 index 000000000..24b663488 --- /dev/null +++ b/java/res/drawable-xhdpi/unbundled_earth_01.png diff --git a/java/res/drawable-xhdpi/unbundled_earth_02.png b/java/res/drawable-xhdpi/unbundled_earth_02.png Binary files differnew file mode 100644 index 000000000..59aa031b0 --- /dev/null +++ b/java/res/drawable-xhdpi/unbundled_earth_02.png diff --git a/java/res/drawable-xhdpi/unbundled_key_01.png b/java/res/drawable-xhdpi/unbundled_key_01.png Binary files differnew file mode 100644 index 000000000..c8b117b44 --- /dev/null +++ b/java/res/drawable-xhdpi/unbundled_key_01.png diff --git a/java/res/drawable-xhdpi/unbundled_key_02.png b/java/res/drawable-xhdpi/unbundled_key_02.png Binary files differnew file mode 100644 index 000000000..dc2da5632 --- /dev/null +++ b/java/res/drawable-xhdpi/unbundled_key_02.png diff --git a/java/res/drawable-xhdpi/unbundled_select_01.png b/java/res/drawable-xhdpi/unbundled_select_01.png Binary files differnew file mode 100644 index 000000000..baf1e55b5 --- /dev/null +++ b/java/res/drawable-xhdpi/unbundled_select_01.png diff --git a/java/res/drawable-xhdpi/unbundled_select_02.png b/java/res/drawable-xhdpi/unbundled_select_02.png Binary files differnew file mode 100644 index 000000000..ad1058e0c --- /dev/null +++ b/java/res/drawable-xhdpi/unbundled_select_02.png 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); } } diff --git a/java/src/com/android/inputmethod/latin/setup/SetupActivity.java b/java/src/com/android/inputmethod/latin/setup/SetupActivity.java index 099169aa9..e333e4d4f 100644 --- a/java/src/com/android/inputmethod/latin/setup/SetupActivity.java +++ b/java/src/com/android/inputmethod/latin/setup/SetupActivity.java @@ -313,10 +313,8 @@ public final class SetupActivity extends Activity { final int paddingEnd = ViewCompatUtils.getPaddingEnd(mActionLabel); ViewCompatUtils.setPaddingRelative(mActionLabel, paddingEnd, 0, paddingEnd, 0); } else { - final Drawable icon = res.getDrawable(actionIcon); - icon.setBounds(0, 0, icon.getIntrinsicWidth(), icon.getIntrinsicHeight()); - TextViewCompatUtils.setCompoundDrawablesRelative( - mActionLabel, icon, null, null, null); + TextViewCompatUtils.setCompoundDrawablesRelativeWithIntrinsicBounds( + mActionLabel, res.getDrawable(actionIcon), null, null, null); } } |