Check Mobile App
Read now
Start a Project

Android Toggle Button View and Vector


A toggle button allows the user to change a setting between two states.

Displays checked/unchecked states as a button with a “light” indicator and by default accompanied with the text “ON” or “OFF”.

In this Blog, we are creating a custom Toggle Button get the custom view/background using drawable.

Here is the toggle_selector drawable used to represent the different state of the toggle button.


We have provided the ready baked code for two Vector Drawable used to represent the different state of the Toggle Button.


ic_favorite_border_black_24dp (image with the border)


Here is the result of the ToggleButton:


Stay updated !!

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*

Be the first to comment.


Very good company, we did get app extension for Magento 2 website. The support was very good they help us through the process. Webkul team is very supportive, I would recommend them.

Yasser Mohamed

Yasser Mohamed

Talk to Sales


Live Chat
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home