title: Creating custom switch
body: <p>Can anyone help me out in creating a switch like the one shown below?</p>
  
  <p><a href="https://i.stack.imgur.com/d8I9mm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/d8I9mm.png" alt="enter image description here"></a></p>
  
  <p>The button in the switch can be dragged to the other side as well. It will change position on click just as the button crosses half from its current position. The text in the button also changes. Here is what I am referring to:</p>
  
  <p><a href="https://i.stack.imgur.com/PTGI5m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PTGI5m.png" alt="enter image description here"></a></p>
  
  <p>I've researched on switches on Android but none of them gave me this result. I've also looked at the toggle button but that did not do the trick either. </p>