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

Commit 832d4786 authored by Stanley Wang's avatar Stanley Wang
Browse files

Update Main Switch widget.

- Update switch size
- Update title magrin right
- Use default text color
- Update switch margin right
- Support xml title attribute

Fix: 177967927
Fix: 177968636

Test: Run robotest and apply the widget in Settings and see the ui
Change-Id: I226abbffc1539cc31e64f4a3b3723c95b40e5780
parent fc890f1f
Loading
Loading
Loading
Loading
+12 −6
Original line number Original line Diff line number Diff line
@@ -15,11 +15,17 @@
  limitations under the License.
  limitations under the License.
  -->
  -->


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


  <size android:height="24dp" android:width="24dp" />
    <shape android:shape="oval" >
      <size android:height="20dp" android:width="20dp" />
      <solid android:color="@color/thumb_off" />
      <solid android:color="@color/thumb_off" />
  <stroke android:width="4dp" android:color="@android:color/transparent" />

    </shape>
    </shape>

  </item>
</layer-list>
+12 −6
Original line number Original line Diff line number Diff line
@@ -15,11 +15,17 @@
  limitations under the License.
  limitations under the License.
  -->
  -->


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


  <size android:height="24dp" android:width="24dp" />
    <shape android:shape="oval" >
      <size android:height="20dp" android:width="20dp" />
      <solid android:color="?android:attr/colorAccent" />
      <solid android:color="?android:attr/colorAccent" />
  <stroke android:width="4dp" android:color="@android:color/transparent" />

    </shape>
    </shape>

  </item>
</layer-list>
+1 −1
Original line number Original line Diff line number Diff line
@@ -20,7 +20,7 @@
  <item
  <item
      android:width="13.33dp"
      android:width="13.33dp"
      android:height="1.67dp"
      android:height="1.67dp"
      android:left="19dp"
      android:left="21dp"
      android:gravity="center"
      android:gravity="center"
      android:drawable="@drawable/track_off_indicator" />
      android:drawable="@drawable/track_off_indicator" />
</layer-list>
</layer-list>
+6 −6
Original line number Original line Diff line number Diff line
@@ -17,17 +17,17 @@


<vector
<vector
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="48dp"
    android:width="52dp"
    android:height="24dp"
    android:height="28dp"
    android:viewportWidth="48"
    android:viewportWidth="52"
    android:viewportHeight="24">
    android:viewportHeight="28">


  <group>
  <group>
    <clip-path
    <clip-path
        android:pathData="M12 0H36C42.6274 0 48 5.37258 48 12C48 18.6274 42.6274 24 36 24H12C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0Z" />
        android:pathData="M14 0H38C45.732 0 52 6.26801 52 14C52 21.732 45.732 28 38 28H14C6.26801 28 0 21.732 0 14C0 6.26801 6.26801 0 14 0Z" />


    <path
    <path
        android:pathData="M0 0V24H48V0"
        android:pathData="M0 0V28H52V0"
        android:fillColor="@color/track_off" />
        android:fillColor="@color/track_off" />
  </group>
  </group>


+1 −1
Original line number Original line Diff line number Diff line
@@ -21,6 +21,6 @@
      android:width="13.19dp"
      android:width="13.19dp"
      android:height="10.06dp"
      android:height="10.06dp"
      android:gravity="center"
      android:gravity="center"
      android:right="19dp"
      android:right="21dp"
      android:drawable="@drawable/track_on_indicator" />
      android:drawable="@drawable/track_on_indicator" />
</layer-list>
</layer-list>
Loading