我浪费了最后一个小时试图弄清楚如何消除简单EditText中的填充:
![enter image description here](https://istack.dev59.com/9q5QI.webp)
我想要的只是将输入与其余内容对齐,就像美丽的设计指南所说的那样。
布局不能再简单了:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.actinarium.tiomantas.SetupChallengeFragment">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/new_challenge_name"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/new_challenge_name_hint1"
android:singleLine="false"/>
</LinearLayout>
</ScrollView>
我尝试将EditText的padding设置为0dp-文本会移动,但是行仍然保持不变。很奇怪,我找不到任何关于这个问题的信息,好像没有人注意到。