Поставьте флажок до и после конца текста - PullRequest
0 голосов
/ 31 декабря 2018

enter image description here

Возможно ли это?Пока текст помещается на экране, выравнивание текста будет после первой кнопки.Также, если текст многострочный и заканчивается посередине, флажок будет после текста, который будет показывать пробел между ними.

1 Ответ

0 голосов
/ 31 декабря 2018

просто скопируйте и вставьте следующий код.надеюсь, это поможет вам

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <CheckBox
        android:id="@+id/checkBox3"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginTop="8dp"
        android:layout_marginEnd="16dp"
        android:text="CheckBox any text  that is multilined you want bla bla bla."
        app:layout_constraintEnd_toStartOf="@+id/checkBox4"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <CheckBox
        android:id="@+id/checkBox4"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="8dp"
        android:text=""
        app:layout_constraintBottom_toBottomOf="@+id/checkBox3"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="@+id/checkBox3" />
</android.support.constraint.ConstraintLayout>
...