The following is part of my entire XML constraint template.
<ImageView
android:id="@+id/img_apn_not_set"
style="@style/DeviceManagementImageView"
android:contentDescription="@string/app_name"
android:src="@drawable/ic_sos"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/view1" />
<TextView
android:id="@+id/tv_apn_not_set"
style="@style/DeviceManagementHeaderText"
android:text="Apn not set"
android:layout_marginTop="5dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/img_apn_not_set"
app:layout_constraintTop_toTopOf="@+id/img_apn_not_set" />
What I'm trying to do is get a text representation in the exact center on the right side of the image. In a linear arrangement, we achieve it mainly by gravity. Here I use marginTopto achieve the same. So I can do the same using any property. Is there something like rightOfCentreOf? thank
source
share