androidandroid-studioandroid-layout

Android Switch with 2 lines of text


enter image description here

I am in between creating a settings activity in which i want a switch like the above screenshot. currently my solution is to use two textviews and a switch. is there any straightforward way to do this?


Solution

  • You have to extend your activity with PreferenceActivity. Then you can use whole bunch of preferences like:

    Useful tutorial can be found at here. and here