我正在尝试将按钮的文本居中,但它总是粘在右边。我试过了gravity
,textAlignment
但这里没有任何效果是我的代码如下:
<Button
android:id="@+id/button1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/textView1"
android:layout_centerHorizontal="true"
android:layout_marginTop="35dp"
android:gravity="center"
android:text="@string/Recipies" />