android - android编辑文本设计-删除编辑文本行底部填充并更改填充之间的文本和行
问题描述
我在android ui设计中遇到了一些问题。
这是一个编辑文本。我必须删除(1)填充并更改(2)的填充大小。(1) 是下划线和边框之间的填充,(2) 是文本和下划线之间的填充。目前这个editText的 android:includeFontPadding="false" 现在。
请快速回答!
解决方案
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<EditText
android:id="@+id/etEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="24dp"
android:background="@null" // removes underline
android:lines="1"
app:layout_constraintEnd_toEndOf="parent"
/>
<View
android:id="@+id/lineTwo"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="5dp" //change this line as you need
android:background="@android:color/white"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/etEmail" />
</android.support.constraint.ConstraintLayout>
推荐阅读
- ios - 如何在原生 iOS 应用中打开 Facebook 页面
- react-native - 如何防止设备缩放级别对我的应用程序产生影响?
- python - 我怎样才能提高地形生成器的性能我得到 40 FPS
- json - 使用 JQ 合并两个 Json 文件
- flutter - Flutter web:无法加载资源:net :: ERR_NAME_NOT_RESOLVED
- java - 如何使用 jlink 将外部库添加到自定义运行时映像?
- mongodb - Mongo 不会启动
- java - ./mvnw spring-boot:run 命令显示“这次 Spring 是意外的”消息
- python - 无法导入名称“read_data”
- javascript - 如何通过基于图像缩略图的锚标记上的 onclick 打开(全屏)图像