android - 如何制作这种类型的自定义 EditText UI?
问题描述
我正在尝试在编辑文本上添加边框并在其上添加标签。我试过这个。
<stroke
android:width="2dp"
android:color="@color/colorPrimary"/>
<corners android:radius="15dp"/>
你能帮忙吗?
解决方案
使用材料设计 Outline Box style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
这个链接可以帮助你http://qaru.site/questions/1688917/custom-textinputlayout-android
推荐阅读
- java - 使用 Java ElasticSearch 高级客户端的问题:SortedNumericIndexFieldData 无法转换为类 IndexGeoPointFieldData
- mediawiki - SMW 索取表格
- mysql - 迁移到 MySQL8,存储过程中的游标导致导入错误
- c# - 如何从 HttpResponseMessage 读取应用程序/pdf 内容类型并将其转换为流
- reactjs - 我的状态更新的点击时间比它应该更新的晚
- javascript - 使用 Express 函数从 PostGIS/PostgreSQL 数据库获取数据并存储在全局变量中
- javascript - 从 Json 树结构创建测验
- google-cloud-build - GCP:如何从 proj-2 CloudBuild 访问 proj-1 秘密管理器?
- scala - 在 spark/scala 的另一个数据框中查找多个列值
- html - 如何将图像放入父块 div 中?