diff options
author | 2012-09-05 15:34:51 +0900 | |
---|---|---|
committer | 2012-09-05 20:38:00 +0900 | |
commit | e8c6d5a480987a1b5d8c3455512f7d75c8fe1de4 (patch) | |
tree | 938ce8ffab9d41d82ad022fdb6a548de1e0f36ff /java/res/drawable | |
parent | 2a2b5edc21c9bbea0ee172baf4b90053ceff98b5 (diff) | |
download | latinime-e8c6d5a480987a1b5d8c3455512f7d75c8fe1de4.tar.gz latinime-e8c6d5a480987a1b5d8c3455512f7d75c8fe1de4.tar.xz latinime-e8c6d5a480987a1b5d8c3455512f7d75c8fe1de4.zip |
Utilize StateListDrawable for key preview background
Change-Id: I268550a185701caecefc27ebaec40fb2c940d883
Diffstat (limited to 'java/res/drawable')
-rw-r--r-- | java/res/drawable/keyboard_key_feedback.xml | 10 | ||||
-rw-r--r-- | java/res/drawable/keyboard_key_feedback_ics.xml | 21 | ||||
-rw-r--r-- | java/res/drawable/keyboard_key_feedback_left_ics.xml | 21 | ||||
-rw-r--r-- | java/res/drawable/keyboard_key_feedback_right_ics.xml | 21 |
4 files changed, 24 insertions, 49 deletions
diff --git a/java/res/drawable/keyboard_key_feedback.xml b/java/res/drawable/keyboard_key_feedback.xml index 159ba8686..397e948d8 100644 --- a/java/res/drawable/keyboard_key_feedback.xml +++ b/java/res/drawable/keyboard_key_feedback.xml @@ -14,9 +14,11 @@ limitations under the License. --> -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_long_pressable="true" - android:drawable="@drawable/keyboard_key_feedback_more_background" /> - +<selector + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" +> + <item latin:state_has_morekeys="true" + android:drawable="@drawable/keyboard_key_feedback_more_background" /> <item android:drawable="@drawable/keyboard_key_feedback_background" /> </selector> diff --git a/java/res/drawable/keyboard_key_feedback_ics.xml b/java/res/drawable/keyboard_key_feedback_ics.xml index 04c86794f..3c8850e6c 100644 --- a/java/res/drawable/keyboard_key_feedback_ics.xml +++ b/java/res/drawable/keyboard_key_feedback_ics.xml @@ -14,8 +14,23 @@ limitations under the License. --> -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_long_pressable="true" - android:drawable="@drawable/keyboard_key_feedback_more_background_holo" /> +<selector + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" +> + <!-- Left edge --> + <item latin:state_left_edge="true" latin:state_has_morekeys="true" + android:drawable="@drawable/keyboard_key_feedback_left_more_background_holo" /> + <item latin:state_left_edge="true" + android:drawable="@drawable/keyboard_key_feedback_left_background_holo" /> + + <!-- Right edge --> + <item latin:state_right_edge="true" latin:state_has_morekeys="true" + android:drawable="@drawable/keyboard_key_feedback_right_more_background_holo" /> + <item latin:state_right_edge="true" + android:drawable="@drawable/keyboard_key_feedback_right_background_holo" /> + + <item latin:state_has_morekeys="true" + android:drawable="@drawable/keyboard_key_feedback_more_background_holo" /> <item android:drawable="@drawable/keyboard_key_feedback_background_holo" /> </selector> diff --git a/java/res/drawable/keyboard_key_feedback_left_ics.xml b/java/res/drawable/keyboard_key_feedback_left_ics.xml deleted file mode 100644 index b68b37f6b..000000000 --- a/java/res/drawable/keyboard_key_feedback_left_ics.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2011 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_long_pressable="true" - android:drawable="@drawable/keyboard_key_feedback_left_more_background_holo" /> - <item android:drawable="@drawable/keyboard_key_feedback_left_background_holo" /> -</selector> diff --git a/java/res/drawable/keyboard_key_feedback_right_ics.xml b/java/res/drawable/keyboard_key_feedback_right_ics.xml deleted file mode 100644 index 830678a5a..000000000 --- a/java/res/drawable/keyboard_key_feedback_right_ics.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2011 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_long_pressable="true" - android:drawable="@drawable/keyboard_key_feedback_right_more_background_holo" /> - <item android:drawable="@drawable/keyboard_key_feedback_right_background_holo" /> -</selector> |