- 9
- 0
- 约3.14千字
- 约 4页
- 2025-05-29 发布于四川
- 举报
第
AndroidEditText设置边框的操作方法
目录AndroidEditText设置边框简介快速开始
AndroidEditText设置边框
简介
Android应用程序中给EditText设置边框。
效果图:
快速开始
1.在res/drawable目录下新建样式文件edit_background.xml。
xmlversion=1.0encoding=utf-8
layer-listxmlns:android=/apk/res/android
item
shape
android:shape=rectangle
solidandroid:color=#efefef/
cornersandroid:radius=5dp/
stroke
android:width=1dp
android:color=#505050/
/shape
/item
2.布局文件中使用边框效果,/res/layout/activity_edit_text.xml。
android:background=@drawable/edit_background
xmlversion=1.0encoding=utf-8
原创力文档

文档评论(0)