以下のレイアウトでは、version_label
とinstalled_label
を10スペース分インデントしたいと思います。 これはConstraintLayoutでどのように行われますか? spaces
のConstraintLayoutでインデントするには?
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="vertical">
<TextView
android:id="@+id/about_app_name"
android:text="@string/app_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:textColor="@color/orange"
android:textSize="@dimen/text_size_xl"
tools:layout_editor_absoluteX="0dp"
app:layout_constraintStart_toStartOf="@+id/constraintLayout"
app:layout_constraintTop_toTopOf="parent"/>
<TextView
android:id="@+id/version_label"
android:text="Version: "
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="0"
android:layout_row="0"
android:textColor="@color/black"
android:textSize="@dimen/text_size_large"
app:layout_constraintStart_toStartOf="@+id/constraintLayout"
app:layout_constraintTop_toBottomOf="@+id/about_app_name"
tools:layout_editor_absoluteX="0dp" />
<TextView
android:id="@+id/version_number"
android:text="@string/text_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="1"
android:layout_row="0"
android:textColor="@color/black"
android:textSize="@dimen/text_size_large"
app:layout_constraintStart_toEndOf="@+id/last_update_label"
app:layout_constraintTop_toBottomOf="@+id/about_app_name"
tools:layout_editor_absoluteX="166dp" />
<TextView
android:id="@+id/installed_label"
android:text="Installed: "
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="0"
android:layout_row="1"
android:textColor="@color/black"
android:textSize="@dimen/text_size_large"
app:layout_constraintStart_toStartOf="@+id/constraintLayout"
app:layout_constraintTop_toBottomOf="@+id/version_label"
tools:layout_editor_absoluteX="0dp" />
<TextView
android:id="@+id/install_date"
android:text="@string/text_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="1"
android:layout_row="1"
android:textColor="@color/black"
android:textSize="@dimen/text_size_large"
app:layout_constraintStart_toEndOf="@+id/last_update_label"
app:layout_constraintTop_toBottomOf="@+id/version_label"
tools:layout_editor_absoluteX="166dp" />
</android.support.constraint.ConstraintLayout>
10スペース?どういう意味ですか? – Divers
パディングやマージンを試しましたか? TextViewsはConstraintLayoutの中でもテキストビューです。 –
申し訳ありません10 px私はそれを言う適切な方法だと思います。 –