2

我有个问题。TextInputLayout 相对于行有边距或填充。

我需要这条线是全宽。

文档: https ://material.io/develop/android/components/text-input-layout/

<code>TextInputLayout</code> 截图

代码:

<com.google.android.material.textfield.TextInputLayout
    android:id="@+id/inputLayoutEmail"
    style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginTop="10dp"
    android:paddingBottom="0dp"
    app:boxBackgroundColor="@color/colorBgDisableButton"
    app:boxCornerRadiusTopEnd="10dp"
    app:boxCornerRadiusTopStart="10dp"
    android:hint="@string/text_signup_email"
    android:textColorHint="@color/colorTextInput"
    android:focusable="false"
    android:clickable="false"
    app:errorEnabled="true"
    app:errorTextAppearance="@style/ErrorTextAppearance"

    >

    <com.google.android.material.textfield.TextInputEditText
        android:id="@+id/inputTextEmail"
        android:layout_width="300dp"
        android:layout_height="wrap_content"
        android:backgroundTint="@color/colorLineInput"
        android:fontFamily="@font/century_gothic"
        android:imeOptions="actionNext"
        android:inputType="textEmailAddress"
        android:lines="1"
        android:maxLines="1"
        android:paddingStart="22dp"
        android:paddingBottom="20dp"
        android:textColor="@color/colorTextInput"
        android:textSize="14sp"
        android:enabled="false"
        android:focusable="false"
        android:clickable="false"
        android:layout_marginStart="0dp"
        android:layout_marginEnd="0dp"

        />

</com.google.android.material.textfield.TextInputLayout>
4

1 回答 1

0

match_parent两个领域,一切都会顺利

于 2019-09-26T09:09:22.633 回答