How can I design custom switch in android as like in below image:
When it's turned on, it needs to look like this
I also need to show toggle animation effects while switching between two categories. How Can I achieve it? Is there any 3rd party SDK or libraries available? Currently I have designed it with a custom linear layout as like this:
my_layout.xml:
<LinearLayout
android:id="@+id/customSliderLayout"
android:layout_width="@dimen/_200sdp"
android:layout_height="@dimen/_39sdp"
android:layout_centerInParent="true"
android:orientation="horizontal"
android:weightSum="2"
android:background="@drawable/oval_layout_bg"
android:layout_centerHorizontal="true">
<Button
android:id="@+id/userBtn"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:textAllCaps="false"
android:text="@string/toggle_user" …Run Code Online (Sandbox Code Playgroud)