【发布时间】:2020-02-11 18:31:56
【问题描述】:
我想删除下图所示的多余空间。
这是我的 xml:
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/sh_layout_mobile"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="28dp"
android:layout_marginEnd="20dp"
android:background="@drawable/gradient_back"
app:boxBackgroundMode="outline"
app:hintEnabled="false"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView9">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:drawableEnd="@drawable/ic_phone"
android:drawableTint="@color/white"
android:drawableTintMode="multiply"
android:drawingCacheQuality="high"
android:fontFamily="@font/roboto"
android:hint="@string/mobile_number"
android:inputType="textPersonName"
android:paddingRight="0dp"
android:textColor="@color/white"
android:textColorHighlight="@color/white"
android:textColorHint="@color/white"
android:textColorLink="@color/white"
android:textSize="15dp" />
</com.google.android.material.textfield.TextInputLayout>
我想要的只是最小化或完全删除顶部空间或边距或填充。我尝试了自己并调整了几个设置,但没有任何效果。
【问题讨论】:
标签: android android-textinputlayout material-components material-components-android