如何在android中装饰编辑文本?
How to Decorate Edit Texts in android?
我一直在尝试设计一个类似于上面 image 形状的编辑文本...谁能告诉我如何创建这种形状?
您可以在 layout.xml
中使用它
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/outlinedTextField"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/label"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:padding="8dp"
android:layout_height="wrap_content"
/>
</com.google.android.material.textfield.TextInputLayout>
我一直在尝试设计一个类似于上面 image 形状的编辑文本...谁能告诉我如何创建这种形状?
您可以在 layout.xml
中使用它<com.google.android.material.textfield.TextInputLayout
android:id="@+id/outlinedTextField"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/label"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:padding="8dp"
android:layout_height="wrap_content"
/>
</com.google.android.material.textfield.TextInputLayout>