From d794f5ae2aee44b9ce75cd675cb7138cd9a4ea82 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Thu, 18 Apr 2013 12:13:08 +0900 Subject: Update setup wizard icons Bug: 8159728 Change-Id: Ia5a14a35292b43dc1eaa2d4edd65134040355149 --- java/res/drawable-hdpi/unbundled_check_01.png | Bin 1358 -> 697 bytes java/res/drawable-hdpi/unbundled_check_02.png | Bin 1451 -> 763 bytes java/res/drawable-hdpi/unbundled_earth_01.png | Bin 2373 -> 1469 bytes java/res/drawable-hdpi/unbundled_earth_02.png | Bin 2680 -> 1544 bytes java/res/drawable-hdpi/unbundled_key_01.png | Bin 1554 -> 985 bytes java/res/drawable-hdpi/unbundled_key_02.png | Bin 1569 -> 1013 bytes java/res/drawable-hdpi/unbundled_select_01.png | Bin 1636 -> 1017 bytes java/res/drawable-hdpi/unbundled_select_02.png | Bin 2098 -> 1235 bytes java/res/drawable-mdpi/unbundled_check_01.png | Bin 0 -> 597 bytes java/res/drawable-mdpi/unbundled_check_02.png | Bin 0 -> 634 bytes java/res/drawable-mdpi/unbundled_earth_01.png | Bin 0 -> 965 bytes java/res/drawable-mdpi/unbundled_earth_02.png | Bin 0 -> 957 bytes java/res/drawable-mdpi/unbundled_key_01.png | Bin 0 -> 709 bytes java/res/drawable-mdpi/unbundled_key_02.png | Bin 0 -> 709 bytes java/res/drawable-mdpi/unbundled_select_01.png | Bin 0 -> 685 bytes java/res/drawable-mdpi/unbundled_select_02.png | Bin 0 -> 849 bytes java/res/drawable-xhdpi/unbundled_check_01.png | Bin 0 -> 876 bytes java/res/drawable-xhdpi/unbundled_check_02.png | Bin 0 -> 1090 bytes java/res/drawable-xhdpi/unbundled_earth_01.png | Bin 0 -> 2183 bytes java/res/drawable-xhdpi/unbundled_earth_02.png | Bin 0 -> 2305 bytes java/res/drawable-xhdpi/unbundled_key_01.png | Bin 0 -> 1306 bytes java/res/drawable-xhdpi/unbundled_key_02.png | Bin 0 -> 1309 bytes java/res/drawable-xhdpi/unbundled_select_01.png | Bin 0 -> 1401 bytes java/res/drawable-xhdpi/unbundled_select_02.png | Bin 0 -> 1681 bytes .../inputmethod/compat/TextViewCompatUtils.java | 18 +++++++++--------- .../inputmethod/latin/setup/SetupActivity.java | 6 ++---- 26 files changed, 11 insertions(+), 13 deletions(-) create mode 100644 java/res/drawable-mdpi/unbundled_check_01.png create mode 100644 java/res/drawable-mdpi/unbundled_check_02.png create mode 100644 java/res/drawable-mdpi/unbundled_earth_01.png create mode 100644 java/res/drawable-mdpi/unbundled_earth_02.png create mode 100644 java/res/drawable-mdpi/unbundled_key_01.png create mode 100644 java/res/drawable-mdpi/unbundled_key_02.png create mode 100644 java/res/drawable-mdpi/unbundled_select_01.png create mode 100644 java/res/drawable-mdpi/unbundled_select_02.png create mode 100644 java/res/drawable-xhdpi/unbundled_check_01.png create mode 100644 java/res/drawable-xhdpi/unbundled_check_02.png create mode 100644 java/res/drawable-xhdpi/unbundled_earth_01.png create mode 100644 java/res/drawable-xhdpi/unbundled_earth_02.png create mode 100644 java/res/drawable-xhdpi/unbundled_key_01.png create mode 100644 java/res/drawable-xhdpi/unbundled_key_02.png create mode 100644 java/res/drawable-xhdpi/unbundled_select_01.png create mode 100644 java/res/drawable-xhdpi/unbundled_select_02.png (limited to 'java') diff --git a/java/res/drawable-hdpi/unbundled_check_01.png b/java/res/drawable-hdpi/unbundled_check_01.png index 8234399d5..42cce2f0f 100644 Binary files a/java/res/drawable-hdpi/unbundled_check_01.png and b/java/res/drawable-hdpi/unbundled_check_01.png differ diff --git a/java/res/drawable-hdpi/unbundled_check_02.png b/java/res/drawable-hdpi/unbundled_check_02.png index 6ccd07b55..dcd120eac 100644 Binary files a/java/res/drawable-hdpi/unbundled_check_02.png and b/java/res/drawable-hdpi/unbundled_check_02.png differ diff --git a/java/res/drawable-hdpi/unbundled_earth_01.png b/java/res/drawable-hdpi/unbundled_earth_01.png index 3d22f3bfc..4a0f087ed 100644 Binary files a/java/res/drawable-hdpi/unbundled_earth_01.png and b/java/res/drawable-hdpi/unbundled_earth_01.png differ diff --git a/java/res/drawable-hdpi/unbundled_earth_02.png b/java/res/drawable-hdpi/unbundled_earth_02.png index 1998aea56..f4bd421f2 100644 Binary files a/java/res/drawable-hdpi/unbundled_earth_02.png and b/java/res/drawable-hdpi/unbundled_earth_02.png differ diff --git a/java/res/drawable-hdpi/unbundled_key_01.png b/java/res/drawable-hdpi/unbundled_key_01.png index 84591ecb7..87c9e2c9b 100644 Binary files a/java/res/drawable-hdpi/unbundled_key_01.png and b/java/res/drawable-hdpi/unbundled_key_01.png differ diff --git a/java/res/drawable-hdpi/unbundled_key_02.png b/java/res/drawable-hdpi/unbundled_key_02.png index f366e524c..0747384b4 100644 Binary files a/java/res/drawable-hdpi/unbundled_key_02.png and b/java/res/drawable-hdpi/unbundled_key_02.png differ diff --git a/java/res/drawable-hdpi/unbundled_select_01.png b/java/res/drawable-hdpi/unbundled_select_01.png index 3887fe491..bb3de2f35 100644 Binary files a/java/res/drawable-hdpi/unbundled_select_01.png and b/java/res/drawable-hdpi/unbundled_select_01.png differ diff --git a/java/res/drawable-hdpi/unbundled_select_02.png b/java/res/drawable-hdpi/unbundled_select_02.png index 6a99b6b09..e56fdab97 100644 Binary files a/java/res/drawable-hdpi/unbundled_select_02.png and b/java/res/drawable-hdpi/unbundled_select_02.png differ diff --git a/java/res/drawable-mdpi/unbundled_check_01.png b/java/res/drawable-mdpi/unbundled_check_01.png new file mode 100644 index 000000000..d0d02a368 Binary files /dev/null and b/java/res/drawable-mdpi/unbundled_check_01.png differ diff --git a/java/res/drawable-mdpi/unbundled_check_02.png b/java/res/drawable-mdpi/unbundled_check_02.png new file mode 100644 index 000000000..d34fa2297 Binary files /dev/null and b/java/res/drawable-mdpi/unbundled_check_02.png differ diff --git a/java/res/drawable-mdpi/unbundled_earth_01.png b/java/res/drawable-mdpi/unbundled_earth_01.png new file mode 100644 index 000000000..ba60181ac Binary files /dev/null and b/java/res/drawable-mdpi/unbundled_earth_01.png differ diff --git a/java/res/drawable-mdpi/unbundled_earth_02.png b/java/res/drawable-mdpi/unbundled_earth_02.png new file mode 100644 index 000000000..9c5263864 Binary files /dev/null and b/java/res/drawable-mdpi/unbundled_earth_02.png differ diff --git a/java/res/drawable-mdpi/unbundled_key_01.png b/java/res/drawable-mdpi/unbundled_key_01.png new file mode 100644 index 000000000..8cd72dbd5 Binary files /dev/null and b/java/res/drawable-mdpi/unbundled_key_01.png differ diff --git a/java/res/drawable-mdpi/unbundled_key_02.png b/java/res/drawable-mdpi/unbundled_key_02.png new file mode 100644 index 000000000..4ef6e0cb7 Binary files /dev/null and b/java/res/drawable-mdpi/unbundled_key_02.png differ diff --git a/java/res/drawable-mdpi/unbundled_select_01.png b/java/res/drawable-mdpi/unbundled_select_01.png new file mode 100644 index 000000000..9ab008a46 Binary files /dev/null and b/java/res/drawable-mdpi/unbundled_select_01.png differ diff --git a/java/res/drawable-mdpi/unbundled_select_02.png b/java/res/drawable-mdpi/unbundled_select_02.png new file mode 100644 index 000000000..8af807b2d Binary files /dev/null and b/java/res/drawable-mdpi/unbundled_select_02.png differ diff --git a/java/res/drawable-xhdpi/unbundled_check_01.png b/java/res/drawable-xhdpi/unbundled_check_01.png new file mode 100644 index 000000000..1300a7f5b Binary files /dev/null and b/java/res/drawable-xhdpi/unbundled_check_01.png differ diff --git a/java/res/drawable-xhdpi/unbundled_check_02.png b/java/res/drawable-xhdpi/unbundled_check_02.png new file mode 100644 index 000000000..715188656 Binary files /dev/null and b/java/res/drawable-xhdpi/unbundled_check_02.png differ diff --git a/java/res/drawable-xhdpi/unbundled_earth_01.png b/java/res/drawable-xhdpi/unbundled_earth_01.png new file mode 100644 index 000000000..24b663488 Binary files /dev/null and b/java/res/drawable-xhdpi/unbundled_earth_01.png differ diff --git a/java/res/drawable-xhdpi/unbundled_earth_02.png b/java/res/drawable-xhdpi/unbundled_earth_02.png new file mode 100644 index 000000000..59aa031b0 Binary files /dev/null and b/java/res/drawable-xhdpi/unbundled_earth_02.png differ diff --git a/java/res/drawable-xhdpi/unbundled_key_01.png b/java/res/drawable-xhdpi/unbundled_key_01.png new file mode 100644 index 000000000..c8b117b44 Binary files /dev/null and b/java/res/drawable-xhdpi/unbundled_key_01.png differ diff --git a/java/res/drawable-xhdpi/unbundled_key_02.png b/java/res/drawable-xhdpi/unbundled_key_02.png new file mode 100644 index 000000000..dc2da5632 Binary files /dev/null and b/java/res/drawable-xhdpi/unbundled_key_02.png differ diff --git a/java/res/drawable-xhdpi/unbundled_select_01.png b/java/res/drawable-xhdpi/unbundled_select_01.png new file mode 100644 index 000000000..baf1e55b5 Binary files /dev/null and b/java/res/drawable-xhdpi/unbundled_select_01.png differ diff --git a/java/res/drawable-xhdpi/unbundled_select_02.png b/java/res/drawable-xhdpi/unbundled_select_02.png new file mode 100644 index 000000000..ad1058e0c Binary files /dev/null and b/java/res/drawable-xhdpi/unbundled_select_02.png differ 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); } } -- cgit v1.2.3-83-g751a