diff --git a/java/res/drawable-hdpi/unbundled_check_01.png b/java/res/drawable-hdpi/unbundled_check_01.png new file mode 100644 index 0000000000000000000000000000000000000000..8234399d5e1dfa73e288fe06409a72e0243e189d Binary files /dev/null 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 new file mode 100644 index 0000000000000000000000000000000000000000..6ccd07b55ad19f25b39d4972d4e33f1557427c59 Binary files /dev/null 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 new file mode 100644 index 0000000000000000000000000000000000000000..3d22f3bfcd5d9787edc863d42e01c20a9106b7ca Binary files /dev/null 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 new file mode 100644 index 0000000000000000000000000000000000000000..1998aea56268200d6c5e590a122be8f0edb59bc6 Binary files /dev/null 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 new file mode 100644 index 0000000000000000000000000000000000000000..84591ecb7fa4d61437d9ebee130ab06999aa327a Binary files /dev/null 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 new file mode 100644 index 0000000000000000000000000000000000000000..f366e524c835c2b71d31350c766215724db7276a Binary files /dev/null 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 new file mode 100644 index 0000000000000000000000000000000000000000..3887fe4916032058573d6e9ccfcb869f3e8e09ca Binary files /dev/null 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 new file mode 100644 index 0000000000000000000000000000000000000000..6a99b6b095fe83006af3911c35342417b6d3815b Binary files /dev/null and b/java/res/drawable-hdpi/unbundled_select_02.png differ diff --git a/java/res/drawable/ic_setup_step1.xml b/java/res/drawable/ic_setup_step1.xml new file mode 100644 index 0000000000000000000000000000000000000000..e26afb3ca0193e9d21c7be7c0accb906c805304e --- /dev/null +++ b/java/res/drawable/ic_setup_step1.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2013, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item + android:state_focused="true" + android:drawable="@drawable/unbundled_key_01" /> + <item + android:state_pressed="true" + android:drawable="@drawable/unbundled_key_01" /> + <item + android:drawable="@drawable/unbundled_key_02" /> +</selector> diff --git a/java/res/drawable/ic_setup_step2.xml b/java/res/drawable/ic_setup_step2.xml new file mode 100644 index 0000000000000000000000000000000000000000..46db29306473390dced913242acf22e4ce74c0f1 --- /dev/null +++ b/java/res/drawable/ic_setup_step2.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2013, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item + android:state_focused="true" + android:drawable="@drawable/unbundled_select_01" /> + <item + android:state_pressed="true" + android:drawable="@drawable/unbundled_select_01" /> + <item + android:drawable="@drawable/unbundled_select_02" /> +</selector> diff --git a/java/res/drawable/ic_setup_step3.xml b/java/res/drawable/ic_setup_step3.xml new file mode 100644 index 0000000000000000000000000000000000000000..4ff9fd933d15cdcb450c8a851283a0f1bdf84f26 --- /dev/null +++ b/java/res/drawable/ic_setup_step3.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2013, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item + android:state_focused="true" + android:drawable="@drawable/unbundled_earth_01" /> + <item + android:state_pressed="true" + android:drawable="@drawable/unbundled_earth_01" /> + <item + android:drawable="@drawable/unbundled_earth_02" /> +</selector> diff --git a/java/res/drawable/ic_setup_step3_finish.xml b/java/res/drawable/ic_setup_step3_finish.xml new file mode 100644 index 0000000000000000000000000000000000000000..8ac8a86d1219d41ee9b5de47349ab39b363a217a --- /dev/null +++ b/java/res/drawable/ic_setup_step3_finish.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2013, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item + android:state_focused="true" + android:drawable="@drawable/unbundled_check_01" /> + <item + android:state_pressed="true" + android:drawable="@drawable/unbundled_check_01" /> + <item + android:drawable="@drawable/unbundled_check_02" /> +</selector> diff --git a/java/res/drawable/setup_step_action_background.xml b/java/res/drawable/setup_step_action_background.xml new file mode 100644 index 0000000000000000000000000000000000000000..25738e3a495fe978a6fb15b9587171e744ca447f --- /dev/null +++ b/java/res/drawable/setup_step_action_background.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2013, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item + android:state_focused="true" + android:drawable="@color/setup_text_action" /> + <item + android:state_pressed="true" + android:drawable="@color/setup_text_action" /> + <item + android:drawable="@color/setup_step_background" /> +</selector> diff --git a/java/res/drawable/setup_step_action_color.xml b/java/res/drawable/setup_step_action_color.xml new file mode 100644 index 0000000000000000000000000000000000000000..c53e026d50eee2352200fd1384d853797c033b7c --- /dev/null +++ b/java/res/drawable/setup_step_action_color.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2013, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item + android:state_focused="true" + android:color="@color/setup_step_background" /> + <item + android:state_pressed="true" + android:color="@color/setup_step_background" /> + <item + android:color="@color/setup_text_action" /> +</selector> diff --git a/java/res/layout/setup_step.xml b/java/res/layout/setup_step.xml index 26d7fe79957275101de43a1a4c3224cf731e29c5..c15d07bad8418ef8798db3a995d055b1a3beff23 100644 --- a/java/res/layout/setup_step.xml +++ b/java/res/layout/setup_step.xml @@ -42,7 +42,7 @@ <View android:layout_width="match_parent" android:layout_height="2dp" /> - <TextView + <Button android:id="@+id/setup_step_action_label" style="@style/setupStepActionLabelStyle" android:gravity="center_vertical" diff --git a/java/res/values/setup-styles.xml b/java/res/values/setup-styles.xml index cfc689a78ef9a68e703e33bc66634236b6184c05..420adcbb74e6bebfaeb660975a1c7ccaf5fd0468 100644 --- a/java/res/values/setup-styles.xml +++ b/java/res/values/setup-styles.xml @@ -38,8 +38,8 @@ <item name="android:textSize">14sp</item> </style> <style name="setupStepActionLabelStyle"> - <item name="android:background">@color/setup_step_background</item> - <item name="android:textColor">@color/setup_text_action</item> + <item name="android:background">@drawable/setup_step_action_background</item> + <item name="android:textColor">@drawable/setup_step_action_color</item> <item name="android:textSize">18sp</item> </style> </resources> diff --git a/java/src/com/android/inputmethod/latin/setup/SetupActivity.java b/java/src/com/android/inputmethod/latin/setup/SetupActivity.java index 2ecd260abe7d1509567cd2b5fd04cf3265e5ff7e..099169aa933ad7e0a44223390d63238741b1e693 100644 --- a/java/src/com/android/inputmethod/latin/setup/SetupActivity.java +++ b/java/src/com/android/inputmethod/latin/setup/SetupActivity.java @@ -20,7 +20,6 @@ import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.res.Resources; -import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.os.Message; @@ -119,7 +118,7 @@ public final class SetupActivity extends Activity { final SetupStep step1 = new SetupStep(findViewById(R.id.setup_step1), appName, R.string.setup_step1_title, R.string.setup_step1_instruction, - R.drawable.ic_settings_language, R.string.setup_step1_action); + R.drawable.ic_setup_step1, R.string.setup_step1_action); step1.setAction(new Runnable() { @Override public void run() { @@ -131,7 +130,7 @@ public final class SetupActivity extends Activity { final SetupStep step2 = new SetupStep(findViewById(R.id.setup_step2), appName, R.string.setup_step2_title, R.string.setup_step2_instruction, - 0 /* actionIcon */, R.string.setup_step2_action); + R.drawable.ic_setup_step2, R.string.setup_step2_action); step2.setAction(new Runnable() { @Override public void run() { @@ -144,7 +143,7 @@ public final class SetupActivity extends Activity { final SetupStep step3 = new SetupStep(findViewById(R.id.setup_step3), appName, R.string.setup_step3_title, R.string.setup_step3_instruction, - R.drawable.sym_keyboard_language_switch, R.string.setup_step3_action); + R.drawable.ic_setup_step3, R.string.setup_step3_action); step3.setAction(new Runnable() { @Override public void run() { @@ -314,9 +313,7 @@ public final class SetupActivity extends Activity { final int paddingEnd = ViewCompatUtils.getPaddingEnd(mActionLabel); ViewCompatUtils.setPaddingRelative(mActionLabel, paddingEnd, 0, paddingEnd, 0); } else { - final int overrideColor = res.getColor(R.color.setup_text_action); final Drawable icon = res.getDrawable(actionIcon); - icon.setColorFilter(overrideColor, PorterDuff.Mode.MULTIPLY); icon.setBounds(0, 0, icon.getIntrinsicWidth(), icon.getIntrinsicHeight()); TextViewCompatUtils.setCompoundDrawablesRelative( mActionLabel, icon, null, null, null);