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

Commit a96f3b9a authored by Stanley Wang's avatar Stanley Wang Committed by Automerger Merge Worker
Browse files

Merge "Fix the problem that the switch should gray out when preference...

Merge "Fix the problem that the switch should gray out when preference disabled." into sc-dev am: ef65dc43

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

Change-Id: I6f134a9d4a5506e9c165450895b759952c1be4eb
parents 3582b491 ef65dc43
Loading
Loading
Loading
Loading
+0 −33
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.
  -->

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:top="@dimen/settingslib_switch_thumb_margin"
        android:left="@dimen/settingslib_switch_thumb_margin"
        android:right="@dimen/settingslib_switch_thumb_margin"
        android:bottom="@dimen/settingslib_switch_thumb_margin">
        <shape android:shape="oval">
            <size
                android:height="@dimen/settingslib_switch_thumb_size"
                android:width="@dimen/settingslib_switch_thumb_size"/>
            <solid
                android:color="@color/settingslib_thumb_off_color"
                android:alpha="?android:attr/disabledAlpha"/>
        </shape>
    </item>
</layer-list>
+0 −31
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2020 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.
  -->

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:top="@dimen/settingslib_switch_thumb_margin"
        android:left="@dimen/settingslib_switch_thumb_margin"
        android:right="@dimen/settingslib_switch_thumb_margin"
        android:bottom="@dimen/settingslib_switch_thumb_margin">
        <shape android:shape="oval">
            <size
                android:height="@dimen/settingslib_switch_thumb_size"
                android:width="@dimen/settingslib_switch_thumb_size"/>
            <solid android:color="@color/settingslib_thumb_off_color"/>
        </shape>
    </item>
</layer-list>
+0 −31
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2020 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.
  -->

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:top="@dimen/settingslib_switch_thumb_margin"
        android:left="@dimen/settingslib_switch_thumb_margin"
        android:right="@dimen/settingslib_switch_thumb_margin"
        android:bottom="@dimen/settingslib_switch_thumb_margin">
        <shape android:shape="oval">
            <size
                android:height="@dimen/settingslib_switch_thumb_size"
                android:width="@dimen/settingslib_switch_thumb_size"/>
            <solid android:color="@color/settingslib_state_on_color"/>
        </shape>
    </item>
</layer-list>
+0 −22
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2020 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:drawable="@drawable/settingslib_thumb_on" android:state_checked="true"/>
    <item android:drawable="@drawable/settingslib_thumb_off" android:state_checked="false"/>
    <item android:drawable="@drawable/settingslib_thumb_disabled" android:state_enabled="false"/>
</selector>
+0 −26
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.
  -->

<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle"
    android:width="@dimen/settingslib_switch_track_width"
    android:height="@dimen/settingslib_switch_track_height">
    <solid
        android:color="@color/settingslib_track_off_color"
        android:alpha="?android:attr/disabledAlpha"/>
    <corners android:radius="@dimen/settingslib_switch_track_radius"/>
</shape>
Loading