In this article we will see how to check if the alignment of radio button is left to right or not. By default alignment of radio button is left to right although with the help of
setLayoutDirection we can change its alignment. Left to right direction is basically tells that indicator is on the left side and text part is on the right 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 left to right or not
4. Check the alignment with the help of
isLeftToRightand 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.