Answer by Ojonugwa Jude Ochalifu for Align text left, checkbox right
Using match_parent for layout_width and android:layoutDirection="rtl" are enough:<android.support.v7.widget.AppCompatCheckBox android:id="@+id/taxDevRadioButton" android:layout_width="match_parent"...
View ArticleAnswer by Swetha Reddy for Align text left, checkbox right
You can achieve this by adding layoutDirection to "rtl"<CheckBox android:id="@+id/checkbox" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="right|center"...
View ArticleAnswer by Sagar Devanga for Align text left, checkbox right
Use this as your LIST / RECYCLER ITEM.The below 2 lines are the key.android:textDirection="ltr" android:layoutDirection="rtl"<CheckBox android:layout_width="match_parent"...
View ArticleAnswer by Homer Wang for Align text left, checkbox right
Just set the switch:Layout Parameters -> Width to "match_parent"originally it's "wrap_content"
View ArticleAnswer by DolDurma for Align text left, checkbox right
for first time you must set button to @nullandroid:button="@null"if you want to onl move android checkbox to right use :android:drawableRight="?android:attr/listChoiceIndicatorMultiple"otherwise if you...
View ArticleAnswer by cfh008 for Align text left, checkbox right
At the basis of Oibaf it's or MSaudi's solutionandroid:button="@null"android:drawableRight="?android:attr/listChoiceIndicatorMultiple"to add android:paddingLeft="0dp"to avoid the empty space at the...
View ArticleAnswer by MSaudi for Align text left, checkbox right
And to get the checkbox's box to the right , in check box attributes android:button="@null"android:drawableRight="?android:attr/listChoiceIndicatorMultiple"
View ArticleAnswer by Amir for Align text left, checkbox right
You also remove android:orientation="vertical" since Relative layout does not support this attribute. It is attribute of Linear Layout.You can try it<LinearLayout android:layout_width="fill_parent"...
View ArticleAnswer by dardan.g for Align text left, checkbox right
Use android:gravity="start<CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Has Diploma:" android:textSize="15dp" android:id="@+id/checkBox_HasDiploma"...
View ArticleAnswer by Oibaf it for Align text left, checkbox right
My solution in this case is to use:<CheckBox... android:button="@null" android:drawableRight="@drawable/my_check".../>where my_radio could be for example you custom selector!Example of selector...
View ArticleAnswer by Randy for Align text left, checkbox right
After trying to do this myself, I finally did it. You just need to put a TextView and a CheckBox in a horizontal layout, and put the gravity on the layout to the right.Here's the code:<LinearLayout...
View ArticleAnswer by Alex Gilleran for Align text left, checkbox right
If you're going to use a relativelayout you might want to consider using the less annoying relativelayout attributes, alignParentLeft and alignParentRight, like so:<RelativeLayout...
View ArticleAnswer by user658042 for Align text left, checkbox right
Since you are already using a RelativeLayout, make use of it's attributes:Remove android:gravity from the children and replace them with android:layout_alignParentLeft="true" for the TextView and...
View ArticleAlign text left, checkbox right
I'm trying to create a layout for a ListView, with a checkbox to the right and some text to the left. The checkbox should be aligned all the way to the right and the TextView aligned all the way to...
View Article
More Pages to Explore .....