Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8c6d5a4 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

Utilize StateListDrawable for key preview background

Change-Id: I268550a185701caecefc27ebaec40fb2c940d883
parent 2a2b5edc
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -14,9 +14,11 @@
     limitations under the License.
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_long_pressable="true"
<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>
+18 −3
Original line number Diff line number Diff line
@@ -14,8 +14,23 @@
     limitations under the License.
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_long_pressable="true"
<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>
+0 −21
Original line number Diff line number Diff line
<?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>
+0 −21
Original line number Diff line number Diff line
<?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>
+3 −3
Original line number Diff line number Diff line
@@ -20,8 +20,8 @@

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="80dp"
    android:textSize="40dp"
    android:layout_height="wrap_content"
    android:background="@drawable/keyboard_key_feedback"
    android:minWidth="32dp"
    android:gravity="center"
/>
Loading