答案 0 :(得分:0)
您可以通过以下代码来做到这一点,textView的Gravity您可以设置所需的内容,
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.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"
android:orientation="vertical">
<ImageView
android:id="@+id/ivV1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@tools:sample/avatars" />
<TextView
android:id="@+id/tvV2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="start"
android:text="nakld"
app:layout_constraintEnd_toStartOf="@+id/ivV3"
app:layout_constraintStart_toEndOf="@+id/ivV1"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/ivV3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@tools:sample/avatars" />
</androidx.constraintlayout.widget.ConstraintLayout>