文本輸入布局的影像
在上圖中,如何將“標簽”水平居中?
uj5u.com熱心網友回復:
<com.google.android.material.textfield.TextInputLayout
android:id="@ id/inputAddress"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/_8sdp"
android:hint="@string/postal_address"
android:textSize="@dimen/_10sdp"
>
<com.google.android.material.textfield.TextInputEditText
android:id="@ id/edtAddress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="adas"
android:textSize="@dimen/_10sdp" />
</com.google.android.material.textfield.TextInputLayout>
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/339843.html
標籤:安卓 xml 安卓布局 android-textinputlayout
