In this article we will see how to check if the layout direction of radio button is right to left or not. By default alignment of radio button is left to right although with the help of
setLayoutDirection we can change its alignment. Right to left direction is basically tells that indicator is on the right side and text part is on the left side.
Overview of the implementation :
1. Create a radio button
2. Set direction to the radio button (optional)
3. Create a label which shows if the alignment is right to left or not
4. Check the alignment with the help of
isRightToLeftand save it in the variable
5. Set the answer to the label with the help of
Below is the implementation –
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course