我试图让我的Textview
对齐到左侧尝试过。和android:gravity="left"
但没有发生。在LinearLayout中对齐左侧的textview(水平)
这是我的XML代码:
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/textView11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:layout_weight="1"
android:text="Email:"
android:textSize="20dp"/>
<EditText
android:id="@+id/editTextAddress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:layout_weight="1"
android:background="@drawable/bg"
android:hint="Enter Address"/>
</LinearLayout>
尝试安卓layout_gravity = “左” –