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

Commit 1bf919a5 authored by Wenyi Wang's avatar Wenyi Wang
Browse files

Use Selector instead of Ripple on pre-L

Ripple was added in API level 21. We use Selector to respond to the
"press" event on older SDKs.

Bug: 25629359
Change-Id: Ie3a9ec09c45d4ed1534906a87db95ed372b75df9
parent 49ef0ba3
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2015 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.
-->

<ripple xmlns:android="http://schemas.android.com/apk/res/android"
     android:color="@color/contacts_accent_color">
     <item android:id="@android:id/mask">
          <shape android:shape="oval">
               <solid android:color="@android:color/white" />
          </shape>
     </item>
</ripple>
 No newline at end of file
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2015 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
  -->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="@color/tab_ripple_color">
    <item android:id="@android:id/mask">
        <color android:color="@android:color/white" />
    </item>
</ripple>
 No newline at end of file
+4 −5
Original line number Diff line number Diff line
@@ -15,11 +15,10 @@
     limitations under the License.
-->

<ripple xmlns:android="http://schemas.android.com/apk/res/android"
     android:color="@color/contacts_accent_color">
     <item android:id="@android:id/mask">
<selector xmlns:android="http://schemas.android.com/apk/res/android">
     <item android:state_pressed="true">
          <shape android:shape="oval">
               <solid android:color="@android:color/white" />
               <solid android:color="@color/primary_color_dark" />
          </shape>
     </item>
</ripple>
 No newline at end of file
</selector>
 No newline at end of file
+5 −6
Original line number Diff line number Diff line
@@ -14,9 +14,8 @@
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License
  -->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="@color/tab_ripple_color">
    <item android:id="@android:id/mask">
        <color android:color="@android:color/white" />
    </item>
</ripple>
 No newline at end of file
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:state_pressed="true"
        android:drawable="@color/primary_color_dark"/>
</selector>
 No newline at end of file