How To Align The Checkboxes In The Checkedtextview In Android
I have a scrollView containing a form composed by multiple CheckedTextView, my problem is that the check boxes of these ones are not in the same level, they are at this end of ever
Solution 1:
This may solve the purpose
<?xml version="1.0" encoding="utf-8"?><ScrollViewxmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"
><LinearLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"android:orientation="vertical"><CheckedTextViewandroid:id="@+id/my_checkedtextview"android:layout_width="match_parent"android:layout_height="wrap_content"android:checkMark="?android:attr/listChoiceIndicatorMultiple"android:checked="true"android:clickable="true"android:gravity="left|center_vertical"android:hint="My text one" /><CheckedTextViewandroid:id="@+id/my_checkedtextview"android:layout_width="match_parent"android:layout_height="wrap_content"android:checkMark="?android:attr/listChoiceIndicatorMultiple"android:checked="true"android:clickable="true"android:gravity="left|center_vertical"android:hint="Trying a larger text " /><CheckedTextViewandroid:id="@+id/my_checkedtextview"android:layout_width="match_parent"android:layout_height="wrap_content"android:checkMark="?android:attr/listChoiceIndicatorMultiple"android:checked="true"android:clickable="true"android:gravity="left|center_vertical"android:hint="Checked" /><CheckedTextViewandroid:id="@+id/my_checkedtextview"android:layout_width="match_parent"android:layout_height="wrap_content"android:checkMark="?android:attr/listChoiceIndicatorMultiple"android:checked="true"android:clickable="true"android:gravity="left|center_vertical"android:hint="text with some more text" /><CheckedTextViewandroid:id="@+id/my_checkedtextview"android:layout_width="match_parent"android:layout_height="wrap_content"android:checkMark="?android:attr/listChoiceIndicatorMultiple"android:checked="true"android:clickable="true"android:gravity="left|center_vertical"android:hint="Checked" /><CheckedTextViewandroid:id="@+id/my_checkedtextview"android:layout_width="match_parent"android:layout_height="wrap_content"android:checkMark="?android:attr/listChoiceIndicatorMultiple"android:checked="true"android:clickable="true"android:gravity="left|center_vertical"android:hint="Checked" /></LinearLayout></ScrollView>
Also attached the output.
Post a Comment for "How To Align The Checkboxes In The Checkedtextview In Android"