update Switch styles [2/4]

neobuddy89: Rewrite, improvise and adapt for 10.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Change-Id: Ic31e4e026c339293541ae1c6aeb3623a66b5d3df
diff --git a/bliss_themes.mk b/bliss_themes.mk
index 131226a..0428272 100644
--- a/bliss_themes.mk
+++ b/bliss_themes.mk
@@ -49,12 +49,13 @@
 
 # Switch themes
 PRODUCT_PACKAGES += \
-    SwitchOnePlus \
-    SwitchStock \
-    Contained \
-    Retro \
-    Narrow \
-    SwitchTelegram
+    ContainedSwitch \
+    MD2Switch \
+    NarrowSwitch \
+    OnePlusSwitch \
+    RetroSwitch \
+    StockSwitch \
+    TelegramSwitch
 
 # QS Tile styles
 PRODUCT_PACKAGES += \
diff --git a/switch/Contained/Android.mk b/switch/Contained/Android.mk
index 4016369..b7c2b4e 100644
--- a/switch/Contained/Android.mk
+++ b/switch/Contained/Android.mk
@@ -1,10 +1,13 @@
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
-CAL_MODULE_TAGS := optional
 
-LOCAL_PACKAGE_NAME := Contained
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_PACKAGE_NAME := ContainedSwitch
+LOCAL_RRO_THEME := ContainedSwitch
 LOCAL_SDK_VERSION := current
 LOCAL_CERTIFICATE := platform
+LOCAL_PRODUCT_MODULE := true
 LOCAL_PRIVILEGED_MODULE := false
 
-include $(BUILD_PACKAGE)
+include $(BUILD_RRO_PACKAGE)
diff --git a/switch/Contained/AndroidManifest.xml b/switch/Contained/AndroidManifest.xml
index f33e00e..973952a 100644
--- a/switch/Contained/AndroidManifest.xml
+++ b/switch/Contained/AndroidManifest.xml
@@ -2,7 +2,7 @@
     package="com.android.system.switch.contained"
     android:versionCode="1"
     android:versionName="1.0">
-    <overlay android:targetPackage="android"/>
+    <overlay android:targetPackage="android" android:priority="1"/>
 
-    <application android:label="Contained" android:hasCode="false"/>
+    <application android:label="Contained Switch" android:hasCode="false"/>
 </manifest>
diff --git a/switch/Contained/res/drawable/switch_thumb_material_anim.xml b/switch/Contained/res/drawable/switch_thumb_material_anim.xml
index c119901..d00f3c4 100644
--- a/switch/Contained/res/drawable/switch_thumb_material_anim.xml
+++ b/switch/Contained/res/drawable/switch_thumb_material_anim.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2019 ion
+<!-- 
+     Copyright (C) 2020 crDroid Android Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -28,7 +29,7 @@
     <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
       <item android:bottom="3dp" android:gravity="center" android:left="3dp" android:right="3dp" android:top="3dp">
         <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
-          <solid android:color="@*android:color/gradient_end"/>
+          <solid android:color="?android:colorBackground"/>
           <size android:width="16dp" android:height="16dp"/>
         </shape>
       </item>
diff --git a/switch/Contained/res/drawable/switch_track_material.xml b/switch/Contained/res/drawable/switch_track_material.xml
index 6a1106f..42111af 100644
--- a/switch/Contained/res/drawable/switch_track_material.xml
+++ b/switch/Contained/res/drawable/switch_track_material.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2019 ion
+<!-- 
+     Copyright (C) 2020 crDroid Android Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
diff --git a/switch/Narrow/Android.mk b/switch/Narrow/Android.mk
index b2254b7..48affed 100644
--- a/switch/Narrow/Android.mk
+++ b/switch/Narrow/Android.mk
@@ -1,10 +1,13 @@
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
-CAL_MODULE_TAGS := optional
 
-LOCAL_PACKAGE_NAME := Narrow
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_PACKAGE_NAME := NarrowSwitch
+LOCAL_RRO_THEME := NarrowSwitch
 LOCAL_SDK_VERSION := current
 LOCAL_CERTIFICATE := platform
+LOCAL_PRODUCT_MODULE := true
 LOCAL_PRIVILEGED_MODULE := false
 
-include $(BUILD_PACKAGE)
+include $(BUILD_RRO_PACKAGE)
diff --git a/switch/Narrow/AndroidManifest.xml b/switch/Narrow/AndroidManifest.xml
index b1e5b1c..7c84839 100644
--- a/switch/Narrow/AndroidManifest.xml
+++ b/switch/Narrow/AndroidManifest.xml
@@ -2,7 +2,7 @@
     package="com.android.system.switch.narrow"
     android:versionCode="1"
     android:versionName="1.0">
-    <overlay android:targetPackage="android"/>
+    <overlay android:targetPackage="android" android:priority="1"/>
 
-    <application android:label="Narrow" android:hasCode="false"/>
+    <application android:label="Narrow Switch" android:hasCode="false"/>
 </manifest>
diff --git a/switch/Narrow/res/drawable/switch_thumb_material_anim.xml b/switch/Narrow/res/drawable/switch_thumb_material_anim.xml
index 46b7fb2..70a855f 100644
--- a/switch/Narrow/res/drawable/switch_thumb_material_anim.xml
+++ b/switch/Narrow/res/drawable/switch_thumb_material_anim.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2019 ion
+<!-- 
+     Copyright (C) 2020 crDroid Android Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -18,8 +19,8 @@
     <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
       <item android:gravity="center">
         <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
-          <solid android:color="?android:colorBackground"/>
-          <stroke android:width="2dp" android:color="@*android:color/switch_track_material"/>
+          <solid android:color="?android:colorButtonNormal"/>
+          <stroke android:width="2dp" android:color="?android:colorButtonNormal"/>
           <size android:width="18dp" android:height="18dp"/>
         </shape>
       </item>
@@ -29,8 +30,8 @@
     <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
       <item android:gravity="center">
         <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
-          <solid android:color="@*android:color/gradient_end"/>
-          <stroke android:width="2dp" android:color="@*android:color/gradient_start"/>
+          <solid android:color="?android:colorAccent"/>
+          <stroke android:width="2dp" android:color="?android:colorAccent"/>
           <size android:width="18dp" android:height="18dp"/>
         </shape>
       </item>
diff --git a/switch/Narrow/res/drawable/switch_track_material.xml b/switch/Narrow/res/drawable/switch_track_material.xml
index 2264bd6..e77d419 100644
--- a/switch/Narrow/res/drawable/switch_track_material.xml
+++ b/switch/Narrow/res/drawable/switch_track_material.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2019 ion
+<!-- 
+     Copyright (C) 2020 crDroid Android Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
diff --git a/switch/OnePlus/Android.mk b/switch/OnePlus/Android.mk
deleted file mode 100644
index b930441..0000000
--- a/switch/OnePlus/Android.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-CAL_MODULE_TAGS := optional
-
-LOCAL_PACKAGE_NAME := SwitchOnePlus
-LOCAL_SDK_VERSION := current
-LOCAL_CERTIFICATE := platform
-LOCAL_PRIVILEGED_MODULE := false
-
-include $(BUILD_PACKAGE)
diff --git a/switch/OnePlus/res/drawable/switch_thumb_material_anim.xml b/switch/OnePlus/res/drawable/switch_thumb_material_anim.xml
deleted file mode 100644
index 0a11c2b..0000000
--- a/switch/OnePlus/res/drawable/switch_thumb_material_anim.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2019 ion
-
-     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:id="@*android:id/off" android:state_checked="false">
-    <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
-      <item android:bottom="3dp" android:gravity="center" android:left="3dp" android:right="3dp" android:top="3dp">
-        <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
-          <solid android:color="?android:colorBackground"/>
-          <size android:width="21dp" android:height="21dp"/>
-        </shape>
-      </item>
-    </layer-list>
-  </item>
-  <item android:id="@*android:id/on" android:state_checked="true">
-    <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
-      <item android:bottom="3dp" android:gravity="center" android:left="3dp" android:right="3dp" android:top="3dp">
-        <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
-          <solid android:color="@*android:color/gradient_end"/>
-          <size android:width="21dp" android:height="21dp"/>
-        </shape>
-      </item>
-    </layer-list>
-  </item>
-</selector>
diff --git a/switch/OnePlus/res/drawable/x_switch_thumb_material_anim.xml b/switch/OnePlus/res/drawable/x_switch_thumb_material_anim.xml
deleted file mode 100644
index 0a11c2b..0000000
--- a/switch/OnePlus/res/drawable/x_switch_thumb_material_anim.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2019 ion
-
-     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:id="@*android:id/off" android:state_checked="false">
-    <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
-      <item android:bottom="3dp" android:gravity="center" android:left="3dp" android:right="3dp" android:top="3dp">
-        <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
-          <solid android:color="?android:colorBackground"/>
-          <size android:width="21dp" android:height="21dp"/>
-        </shape>
-      </item>
-    </layer-list>
-  </item>
-  <item android:id="@*android:id/on" android:state_checked="true">
-    <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
-      <item android:bottom="3dp" android:gravity="center" android:left="3dp" android:right="3dp" android:top="3dp">
-        <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
-          <solid android:color="@*android:color/gradient_end"/>
-          <size android:width="21dp" android:height="21dp"/>
-        </shape>
-      </item>
-    </layer-list>
-  </item>
-</selector>
diff --git a/switch/OnePlus/res/drawable/x_switch_track_material.xml b/switch/OnePlus/res/drawable/x_switch_track_material.xml
deleted file mode 100644
index 1ec1207..0000000
--- a/switch/OnePlus/res/drawable/x_switch_track_material.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-    Copyright (c) 2018 Havoc-OS
-
-    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_checked="true">
-        <layer-list>
-            <item android:gravity="center_vertical|fill_horizontal"
-                  android:start="4dp"
-                  android:end="4dp">
-                <shape android:shape="rectangle" >
-                    <size android:height="14dp" android:width="5dp" />
-                    <corners android:radius="7dp" />
-	                <gravity android:gravity="center_vertical" />
-                    <solid android:color="@*android:color/transparent" />
-                    <stroke
-                        android:width="2dp"
-                        android:color="@*android:color/gradient_start"/>
-                </shape>
-            </item>
-        </layer-list>
-    </item>
-    <item android:state_checked="false">
-        <layer-list>
-            <item android:gravity="center_vertical|fill_horizontal"
-                  android:start="4dp"
-                  android:end="4dp">
-                <shape android:shape="rectangle" >
-                    <size android:height="14dp" android:width="5dp" />
-                    <corners android:radius="7dp" />
-	                <gravity android:gravity="center_vertical" />
-                    <solid android:color="@*android:color/transparent" />
-                    <stroke
-                        android:width="2dp"
-                        android:color="@*android:color/switch_track_material"/>
-                </shape>
-            </item>
-        </layer-list>
-    </item>
-</selector>
diff --git a/switch/OnePlusSwitch/Android.mk b/switch/OnePlusSwitch/Android.mk
new file mode 100644
index 0000000..7e4798d
--- /dev/null
+++ b/switch/OnePlusSwitch/Android.mk
@@ -0,0 +1,13 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_PACKAGE_NAME := OnePlusSwitch
+LOCAL_RRO_THEME := OnePlusSwitch
+LOCAL_SDK_VERSION := current
+LOCAL_CERTIFICATE := platform
+LOCAL_PRODUCT_MODULE := true
+LOCAL_PRIVILEGED_MODULE := false
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/switch/OnePlus/AndroidManifest.xml b/switch/OnePlusSwitch/AndroidManifest.xml
similarity index 60%
rename from switch/OnePlus/AndroidManifest.xml
rename to switch/OnePlusSwitch/AndroidManifest.xml
index eb1ccc6..70d5aa4 100644
--- a/switch/OnePlus/AndroidManifest.xml
+++ b/switch/OnePlusSwitch/AndroidManifest.xml
@@ -2,7 +2,7 @@
     package="com.android.system.switch.oneplus"
     android:versionCode="1"
     android:versionName="1.0">
-    <overlay android:targetPackage="android"/>
+    <overlay android:targetPackage="android" android:priority="1"/>
 
-    <application android:label="Switch OnePlus" android:hasCode="false"/>
+    <application android:label="OnePlus Switch" android:hasCode="false"/>
 </manifest>
diff --git a/switch/OnePlus/res/drawable/switch_track_material.xml b/switch/OnePlusSwitch/res/drawable/switch_track_material.xml
similarity index 62%
rename from switch/OnePlus/res/drawable/switch_track_material.xml
rename to switch/OnePlusSwitch/res/drawable/switch_track_material.xml
index 1ec1207..c566414 100644
--- a/switch/OnePlus/res/drawable/switch_track_material.xml
+++ b/switch/OnePlusSwitch/res/drawable/switch_track_material.xml
@@ -1,18 +1,18 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!--
-    Copyright (c) 2018 Havoc-OS
+<!-- 
+     Copyright (C) 2020 crDroid Android 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
+     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
+          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.
+     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">
@@ -25,10 +25,10 @@
                     <size android:height="14dp" android:width="5dp" />
                     <corners android:radius="7dp" />
 	                <gravity android:gravity="center_vertical" />
-                    <solid android:color="@*android:color/transparent" />
+                    <solid android:color="@android:color/transparent" />
                     <stroke
                         android:width="2dp"
-                        android:color="@*android:color/gradient_start"/>
+                        android:color="@*android:color/switch_track_material"/>
                 </shape>
             </item>
         </layer-list>
@@ -42,7 +42,7 @@
                     <size android:height="14dp" android:width="5dp" />
                     <corners android:radius="7dp" />
 	                <gravity android:gravity="center_vertical" />
-                    <solid android:color="@*android:color/transparent" />
+                    <solid android:color="@android:color/transparent" />
                     <stroke
                         android:width="2dp"
                         android:color="@*android:color/switch_track_material"/>
diff --git a/switch/Stock/Android.mk b/switch/Stock/Android.mk
index a34889e..d144704 100644
--- a/switch/Stock/Android.mk
+++ b/switch/Stock/Android.mk
@@ -1,10 +1,13 @@
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
-CAL_MODULE_TAGS := optional
 
-LOCAL_PACKAGE_NAME := SwitchStock
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_PACKAGE_NAME := StockSwitch
+LOCAL_RRO_THEME := StockSwitch
 LOCAL_SDK_VERSION := current
 LOCAL_CERTIFICATE := platform
+LOCAL_PRODUCT_MODULE := true
 LOCAL_PRIVILEGED_MODULE := false
 
-include $(BUILD_PACKAGE)
+include $(BUILD_RRO_PACKAGE)
diff --git a/switch/Stock/AndroidManifest.xml b/switch/Stock/AndroidManifest.xml
index c9552b2..eae932f 100644
--- a/switch/Stock/AndroidManifest.xml
+++ b/switch/Stock/AndroidManifest.xml
@@ -2,7 +2,7 @@
     package="com.android.system.switch.stock"
     android:versionCode="1"
     android:versionName="1.0">
-    <overlay android:targetPackage="android"/>
+    <overlay android:targetPackage="android" android:priority="1"/>
 
-    <application android:label="Switch Stock" android:hasCode="false"/>
+    <application android:label="Stock Switch" android:hasCode="false"/>
 </manifest>
diff --git a/switch/Stock/res/drawable/switch_track_material.xml b/switch/Stock/res/drawable/switch_track_material.xml
index 2e2a191..6f6fcc3 100644
--- a/switch/Stock/res/drawable/switch_track_material.xml
+++ b/switch/Stock/res/drawable/switch_track_material.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!-- 
+     Copyright (C) 2020 crDroid Android Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -13,14 +14,10 @@
      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_checked="true">
         <shape android:visible="true" android:shape="rectangle" android:useLevel="false">
-        <gradient 
-            android:startColor="@*android:color/gradient_start"
-            android:endColor="@*android:color/gradient_end"
-            android:angle="45"/>
+            <solid android:color="@android:color/transparent" />
             <corners android:radius="25dp" />
             <size android:height="21dp" android:width="25dp" />
         </shape>
diff --git a/switch/Telegram/Android.mk b/switch/Telegram/Android.mk
index bc00fcc..ca114b3 100644
--- a/switch/Telegram/Android.mk
+++ b/switch/Telegram/Android.mk
@@ -1,10 +1,13 @@
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
-CAL_MODULE_TAGS := optional
 
-LOCAL_PACKAGE_NAME := SwitchTelegram
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_PACKAGE_NAME := TelegramSwitch
+LOCAL_RRO_THEME := TelegramSwitch
 LOCAL_SDK_VERSION := current
 LOCAL_CERTIFICATE := platform
+LOCAL_PRODUCT_MODULE := true
 LOCAL_PRIVILEGED_MODULE := false
 
-include $(BUILD_PACKAGE)
+include $(BUILD_RRO_PACKAGE)
diff --git a/switch/Telegram/AndroidManifest.xml b/switch/Telegram/AndroidManifest.xml
index 4353cf0..3322f78 100644
--- a/switch/Telegram/AndroidManifest.xml
+++ b/switch/Telegram/AndroidManifest.xml
@@ -2,7 +2,7 @@
     package="com.android.system.switch.telegram"
     android:versionCode="1"
     android:versionName="1.0">
-    <overlay android:targetPackage="android"/>
+    <overlay android:targetPackage="android" android:priority="1"/>
 
-    <application android:label="Switch Telegram" android:hasCode="false"/>
+    <application android:label="Telegram Switch" android:hasCode="false"/>
 </manifest>
diff --git a/switch/Telegram/res/drawable/switch_thumb_material_anim.xml b/switch/Telegram/res/drawable/switch_thumb_material_anim.xml
index 2d5d9f4..dbf8bd3 100644
--- a/switch/Telegram/res/drawable/switch_thumb_material_anim.xml
+++ b/switch/Telegram/res/drawable/switch_thumb_material_anim.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- 
-     Copyright (C) 2019 ViperOS Project
+     Copyright (C) 2020 crDroid Android Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -17,18 +17,18 @@
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
     <item android:state_checked="true">
         <shape android:visible="true" android:shape="rectangle" android:useLevel="false">
-            <solid android:color="@*android:color/gradient_end"/>
+            <solid android:color="?android:colorBackground"/>
             <corners android:radius="100dp" />
             <size android:height="20dp" android:width="20dp" />
-            <stroke android:width="1.5dp" android:color="@*android:color/switch_track_material" />
+            <stroke android:width="1.5dp" android:color="?android:colorControlActivated" />
         </shape>
     </item>
     <item android:state_checked="false">
         <shape android:visible="true" android:shape="rectangle" android:useLevel="false">
-            <solid android:color="@*android:color/notification_material_background_color" />
+            <solid android:color="?android:colorBackground"/>
             <corners android:radius="100dp" />
             <size android:height="20dp" android:width="20dp" />
-            <stroke android:width="1.5dp" android:color="@*android:color/switch_track_material" />
+            <stroke android:width="1.5dp" android:color="?android:colorButtonNormal" />
         </shape>
     </item>
 </selector>
diff --git a/switch/Telegram/res/drawable/switch_track_material.xml b/switch/Telegram/res/drawable/switch_track_material.xml
index 446eb0e..6d6f828 100644
--- a/switch/Telegram/res/drawable/switch_track_material.xml
+++ b/switch/Telegram/res/drawable/switch_track_material.xml
@@ -1,24 +1,39 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!-- 
+     Copyright (C) 2020 crDroid Android 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:gravity="center_vertical|fill_horizontal"
+    <item android:state_checked="false"
+          android:gravity="center_vertical|fill_horizontal"
           android:start="4dp"
           android:end="4dp">
         <shape android:shape="rectangle"
                android:tint="@*android:color/switch_track_material">
             <corners android:radius="7dp" />
-            <solid android:color="@*android:color/white_disabled_material" />
+            <solid android:color="@*android:color/switch_track_material" />
+            <size android:height="14dp" />
+        </shape>
+    </item>
+    <item android:state_checked="true"
+          android:gravity="center_vertical|fill_horizontal"
+          android:start="4dp"
+          android:end="4dp">
+        <shape android:shape="rectangle"
+               android:tint="@*android:color/switch_track_material">
+            <corners android:radius="7dp" />
+            <solid android:color="?android:colorControlActivated"/>
             <size android:height="14dp" />
         </shape>
     </item>