自定义EditText

时间:2019-05-14 15:08:27

标签: java android xml kotlin

有没有实现此自定义editText的库或方法?enter image description here

这是通过在editText内的textInputLayout周围包裹自定义布局来实现的

enter image description here

1 个答案:

答案 0 :(得分:0)

尝试一下

  <android.support.design.widget.TextInputLayout
                android:layout_marginTop="10dp"
                style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="8dp"
                android:minWidth="400dp">
            <android.support.design.widget.TextInputEditText
                    android:id="@+id/editTitle"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:hint="@string/hint_title_required"/>
        </android.support.design.widget.TextInputLayout>
相关问题