Commit bac731ec authored by narinder Rana's avatar narinder Rana
Browse files

Update SwitchCompat like Ios

parent 3cc6a388
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="false">
<shape android:shape="oval">
<solid android:color="@android:color/white" />
<size android:width="20dp" android:height="20dp" />
<stroke android:width="2dp" android:color="#0000ffff" />
</shape> <!-- shape circle -->
</item>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true">
<shape android:shape="rectangle">
<size android:width="36dp" android:height="20dp"/>
<solid android:width="1dp" android:color="@color/accent_color"/>
<corners android:radius="50dp"/>
</shape>
</item>
<item android:state_checked="false">
<shape android:shape="rectangle">
<size android:width="36dp" android:height="20dp"/>
<solid android:width="1dp" android:color="@android:color/darker_gray"/>
<corners android:radius="50dp"/>
</shape>
</item>
</selector>
\ No newline at end of file
......@@ -36,6 +36,7 @@
app:layout_gravity="center_vertical"
app:layout_row="0" />
<!--android:theme="@style/ThemeOverlay.Control.Accent"-->
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/onoff"
android:layout_width="wrap_content"
......@@ -43,7 +44,9 @@
android:layout_marginTop="@dimen/alarm_clock_vertical_margin"
android:minHeight="@dimen/touch_target_min_size"
android:minWidth="@dimen/touch_target_min_size"
android:theme="@style/ThemeOverlay.Control.Accent"
SwitchCompat:track="@drawable/switch_track_selector"
android:thumb="@drawable/thumb_selector"
app:track="@drawable/track_selector"
app:layout_column="6"
app:layout_columnSpan="2"
app:layout_gravity="center_vertical"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment