Android 约束布局无法对齐两个视图

Android 约束布局无法对齐两个视图,android,android-layout,android-xml,android-constraintlayout,Android,Android Layout,Android Xml,Android Constraintlayout,我想将SachinTextview与TendulkarTextview对齐 截图: 设计时,我得到了适当的调整。但它在应用程序中失败了 XML: <TextView android:id="@+id/tvFirstName" style="@style/MediumBlack" android:layout_width="wrap_content" android:layout_height="wrap_content"

我想将SachinTextview与TendulkarTextview对齐

截图:

设计时,我得到了适当的调整。但它在应用程序中失败了

XML:

<TextView
        android:id="@+id/tvFirstName"
        style="@style/MediumBlack"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginTop="16dp"
        android:text="First Name: "
        app:layout_constraintHorizontal_bias="0.09"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/tvLastName"
        style="@style/MediumBlack"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Last Name: "
        app:layout_constraintLeft_toLeftOf="@+id/tvFirstName"
        app:layout_constraintTop_toBottomOf="@+id/tvFirstName"
        android:layout_marginLeft="0dp"
        android:layout_marginTop="-10dp" />

    <TextView
        android:id="@+id/textView4"
        style="@style/SmallGray"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="0dp"
        android:text="Sachin"
        app:layout_constraintLeft_toRightOf="@+id/tvFirstName"
        app:layout_constraintBaseline_toBaselineOf="@+id/tvFirstName" />

    <TextView
        android:id="@+id/textView2"
        style="@style/SmallGray"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Tendulkar"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintBaseline_toBaselineOf="@+id/tvLastName"
        app:layout_constraintHorizontal_bias="0.47" />

android studio是否有特定于Yout的功能

您对“Tendulkar”的限制导致
TextView
居中。您希望将该
文本视图的左侧与“Sachin”的左侧对齐,如下所示:

<TextView
    android:id="@+id/textView2"
    style="@style/SmallGray"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Tendulkar"
    app:layout_constraintLeft_toLeftOf="@id/textView4"
    app:layout_constraintBaseline_toBaselineOf="@+id/tvLastName"/>

我也消除了偏见