无法删除材料编辑文本的下边框。
下面是我尝试过的代码:
<com.google.android.material.textfield.TextInputLayout
android:layout_width="200dp"
android:layout_height="50dp"
android:layout_marginBottom="40dp"
app:passwordToggleEnabled="true">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/register_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:background="#00000000"
android:textSize="14sp" />
</com.google.android.material.textfield.TextInputLayout>输出为:

发布于 2021-10-20 02:48:04
我已经设法去掉了底线。感谢所有人
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginEnd="5dp"
android:layout_marginBottom="2dp"
android:hint=" "
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
>
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/usernameEditText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:inputType="text"
android:maxLines="1"
android:hint="Username"
android:background="#00000000"
android:textSize="14sp" />
</com.google.android.material.textfield.TextInputLayout>https://stackoverflow.com/questions/69634298
复制相似问题