xml使用:
<EditText android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="15dp"
android:layout_margin="14dp"
android:background="@drawable/edit_background"
>
代码使用:
//wrong
//edittext.setPadding(30, 30, 30, 30);
//edittext.setBackgroundResource(R.drawable.edit_background);
//right
edittext.setBackgroundResource(R.drawable.edit_background);
edittext.setPadding(30, 30, 30, 30);
注意:必须先设置backgroundResouce,再设置padding,顺序不能颠倒
android edittext style
License
475789729/BootStrapStyleEditTextDemo
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
android edittext style
Topics
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published