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

Commit 041a9d1f authored by Cole Faust's avatar Cole Faust Committed by Automerger Merge Worker
Browse files

Merge "Create ux restricted customizations for DeviceDefault buttons and...

Merge "Create ux restricted customizations for DeviceDefault buttons and switches" into rvc-qpr-dev am: 89af47ea am: e9a7a1cf

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13472372

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5dfde5e1af634a2c9636caecf693540e7758e76b
parents 8098f49d e9a7a1cf
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -16,5 +16,6 @@ limitations under the License.
<!-- Default text colors for car buttons when enabled/disabled. -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:color="@*android:color/car_grey_700" android:state_enabled="false"/>
    <item android:color="@*android:color/car_grey_700" android:state_ux_restricted="true"/>
    <item android:color="?android:attr/colorButtonNormal"/>
</selector>
+27 −0
Original line number 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.
-->
<!-- copy of switch_track_material, but with a ux restricted state -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_enabled="false"
          android:color="?attr/colorForeground"
          android:alpha="?attr/disabledAlpha" />
    <item android:state_ux_restricted="true"
          android:color="?attr/colorForeground"
          android:alpha="?attr/disabledAlpha" />
    <item android:state_checked="true"
          android:color="?attr/colorControlActivated" />
    <item android:color="?attr/colorForeground" />
</selector>
+22 −0
Original line number Diff line number Diff line
@@ -25,6 +25,22 @@ limitations under the License.
                    android:color="#0059B3"/>
        </shape>
    </item>
    <item android:state_focused="true" android:state_pressed="true" android:state_ux_restricted="true">
        <shape android:shape="rectangle">
            <corners android:radius="@*android:dimen/car_button_radius"/>
            <solid android:color="@*android:color/car_grey_300"/>
            <stroke android:width="4dp"
                    android:color="#0059B3"/>
        </shape>
    </item>
    <item android:state_focused="true" android:state_ux_restricted="true">
        <shape android:shape="rectangle">
            <corners android:radius="@*android:dimen/car_button_radius"/>
            <solid android:color="@*android:color/car_grey_300"/>
            <stroke android:width="8dp"
                    android:color="#0059B3"/>
        </shape>
    </item>
    <item android:state_focused="true" android:state_pressed="true">
        <shape android:shape="rectangle">
            <corners android:radius="@*android:dimen/car_button_radius"/>
@@ -47,6 +63,12 @@ limitations under the License.
            <solid android:color="@*android:color/car_grey_300"/>
        </shape>
    </item>
    <item android:state_ux_restricted="true">
        <shape android:shape="rectangle">
            <corners android:radius="@*android:dimen/car_button_radius"/>
            <solid android:color="@*android:color/car_grey_300"/>
        </shape>
    </item>
    <item>
        <ripple android:color="?android:attr/colorControlHighlight">
            <item>
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@
      android:right="@dimen/car_switch_track_margin_size">
    <shape
        android:shape="rectangle"
        android:tint="@color/switch_track_material">
        android:tint="@color/car_switch_track">
      <corners android:radius="7dp" />
      <solid android:color="@color/white_disabled_material" />
      <size android:height="14dp" />
+24 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 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.
-->

<!-- Formatting note: terminate all comments with a period, to avoid breaking
     the documentation output. To suppress comment lines from the documentation
     output, insert an eat-comment element after the comment lines.
-->

<resources>
     <attr name="state_ux_restricted" format="boolean"/>
</resources>