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

Commit fb81df0d authored by Danny Baumann's avatar Danny Baumann Committed by Matt Garnes
Browse files

Fix up 'clear recents' UX.

Use the 'dismiss all' button drawable and place the button in the upper
right corner. Doing so fixes the broken animation when going into
recents.

Change-Id: I497a8b023f1872c5f9ae5df87af6ed2159e6b7b1
(cherry picked from commit 2283e0a2)
parent 724a6c52
Loading
Loading
Loading
Loading
+0 −23
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2014 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. ?android:attr/colorControlHighlight"
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:state_pressed="true" android:color="#80ffffff"/>
    <item android:color="#ffffffff"/>

</selector>
+0 −23
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 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_pressed="true"
         android:drawable="@drawable/clear_recents_pressed" />
    <item
         android:drawable="@drawable/clear_recents_normal" />
</selector>
+0 −24
Original line number Original line Diff line number Diff line
<!--
Copyright (C) 2014 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24.0dp"
        android:height="24.0dp"
        android:viewportWidth="24.0"
        android:viewportHeight="24.0">
    <path
        android:pathData="M19,6.4L17.6 5 12 10.6 6.4 5 5 6.4 10.6 12 5 17.6 6.4 19 12 13.4 17.6 19 19 17.6 13.4 12 z"
        android:fillColor="#FFFFFF"/>
</vector>
+0 −24
Original line number Original line Diff line number Diff line
<!--
Copyright (C) 2014 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24.0dp"
        android:height="24.0dp"
        android:viewportWidth="24.0"
        android:viewportHeight="24.0">
    <path
        android:pathData="M19,6.4L17.6 5 12 10.6 6.4 5 5 6.4 10.6 12 5 17.6 6.4 19 12 13.4 17.6 19 19 17.6 13.4 12 z"
        android:fillColor="#CCFFFFFF"/>
</vector>
+15 −26
Original line number Original line Diff line number Diff line
@@ -26,35 +26,13 @@
        android:scaleType="fitXY"
        android:scaleType="fitXY"
        android:src="@drawable/recents_status_gradient" />
        android:src="@drawable/recents_status_gradient" />


    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical" >

    <!-- Recents View -->
    <!-- Recents View -->
    <com.android.systemui.recents.views.RecentsView
    <com.android.systemui.recents.views.RecentsView
        android:id="@+id/recents_view"
        android:id="@+id/recents_view"
        android:layout_width="match_parent"
        android:layout_width="match_parent"
            android:layout_height="0dp"
        android:layout_height="match_parent"
            android:layout_weight="1"
        android:focusable="true" />
        android:focusable="true" />


        <TextView
            android:id="@+id/clear_recents"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:layout_marginBottom="8dp"
            android:layout_marginTop="8dp"
            android:gravity="center"
            android:drawableStart="@drawable/clear_recents"
            android:textAllCaps="true"
            android:textSize="16dp"
            android:textColor="@color/clear_recents_text_color"
            android:text="@string/clear_recents" />
                                                                                            
    </LinearLayout>

    <!-- Empty View -->
    <!-- Empty View -->
    <ViewStub android:id="@+id/empty_view_stub"
    <ViewStub android:id="@+id/empty_view_stub"
           android:layout="@layout/recents_empty"
           android:layout="@layout/recents_empty"
@@ -67,6 +45,17 @@
           android:layout_width="match_parent"
           android:layout_width="match_parent"
           android:layout_height="match_parent" />
           android:layout_height="match_parent" />


    <!-- Clear Recents View -->
    <ImageView
        android:id="@+id/clear_recents"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:layout_gravity="top|right"
        android:src="@drawable/ic_dismiss_all"
        android:scaleType="centerInside"
        android:background="@drawable/recents_button_bg"
        android:contentDescription="@string/clear_recents" />

    <!-- Nav Bar Scrim View -->
    <!-- Nav Bar Scrim View -->
    <ImageView
    <ImageView
        android:id="@+id/nav_bar_scrim"
        android:id="@+id/nav_bar_scrim"
Loading