MaxxOr:
基本的に私は改行を引き起こし、かなり長い文字列とボタンがあります。ボタンは、ボタンは親の全幅を占めるようしかし、このような複数回線ボタンのテキストを無視され、左余白と右を持っています。
明らか解決策は、しかし、ボタンはもはや包まれbuttontext短いために意味幅静的を強制0dpにレイアウト幅を設定することです。
幅のためwrap_contentを保つが、まだ余裕が無視されていないためにどのように良いの解決策はありますか?
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="32dp"
android:layout_marginRight="32dp"
android:text="@string/longstring"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>