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

Commit 7948cf88 authored by Edgar Wang's avatar Edgar Wang Committed by Android (Google) Code Review
Browse files

Merge "Update MainSwitchBar to Material Next style." into sc-dev

parents 673add4d d979dbd6
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2020 The Android Open Source Project
  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.
@@ -15,12 +15,12 @@
  limitations under the License.
  -->

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
  <item android:drawable="@drawable/track_on_background" />
  <item
      android:width="13.19dp"
      android:height="10.06dp"
      android:gravity="center"
      android:right="21dp"
      android:drawable="@drawable/track_on_indicator" />
</layer-list>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="?android:attr/colorControlHighlight">
    <item>
        <shape android:shape="rectangle">
            <solid android:color="@color/state_off_color"/>
            <corners android:radius="@dimen/switch_bar_radius"/>
        </shape>
    </item>
</ripple>
+10 −18
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2020 The Android Open Source Project
  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.
@@ -15,20 +15,12 @@
  limitations under the License.
  -->

<vector
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="13.33dp"
    android:height="1.67dp"
    android:viewportWidth="13.33"
    android:viewportHeight="1.67">

  <group>
    <clip-path
        android:pathData="M0 0H13.3333V1.66667H0V0Z" />

    <path
        android:pathData="M0 0V1.66667H13.3333V0"
        android:fillColor="@android:color/white" />
  </group>

</vector>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="?android:attr/colorControlHighlight">
    <item>
        <shape android:shape="rectangle">
            <solid android:color="@color/state_off_color"/>
            <corners android:radius="@dimen/switch_bar_radius"/>
        </shape>
    </item>
</ripple>
+10 −10
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2020 The Android Open Source Project
  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.
@@ -15,12 +15,12 @@
  limitations under the License.
  -->

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
  <item android:drawable="@drawable/track_off_background" />
  <item
      android:width="13.33dp"
      android:height="1.67dp"
      android:left="21dp"
      android:gravity="center"
      android:drawable="@drawable/track_off_indicator" />
</layer-list>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="?android:attr/colorControlHighlight">
    <item>
        <shape android:shape="rectangle">
            <solid android:color="@color/state_on_color"/>
            <corners android:radius="@dimen/switch_bar_radius"/>
        </shape>
    </item>
</ripple>
+33 −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.
  -->

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:top="@dimen/switch_thumb_margin"
        android:left="@dimen/switch_thumb_margin"
        android:right="@dimen/switch_thumb_margin"
        android:bottom="@dimen/switch_thumb_margin">
        <shape android:shape="oval">
            <size
                android:height="@dimen/switch_thumb_size"
                android:width="@dimen/switch_thumb_size"/>
            <solid
                android:color="@color/state_off_color"
                android:alpha="?android:attr/disabledAlpha"/>
        </shape>
    </item>
</layer-list>
+12 −12
Original line number Diff line number Diff line
@@ -17,15 +17,15 @@

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item
      android:top="4dp"
      android:left="4dp"
      android:right="4dp"
      android:bottom="4dp">

        android:top="@dimen/switch_thumb_margin"
        android:left="@dimen/switch_thumb_margin"
        android:right="@dimen/switch_thumb_margin"
        android:bottom="@dimen/switch_thumb_margin">
        <shape android:shape="oval">
      <size android:height="20dp" android:width="20dp" />
      <solid android:color="@color/thumb_off" />
            <size
                android:height="@dimen/switch_thumb_size"
                android:width="@dimen/switch_thumb_size"/>
            <solid android:color="@color/state_off_color"/>
        </shape>

    </item>
</layer-list>
Loading