Mat*_*nMV 5 user-interface android
我正在尝试学习Android及其UI.是否有可能在EditText下面创建一个类似我的设计?

其中应包括:
可能会在事件发生时弄清楚如何更改图标和粗笔划,但不知道如何在editText平滑内部使用右边框边缘编码图标.救命!
您可以使用
android:drawableLeft="@drawable/your_drawable"
Run Code Online (Sandbox Code Playgroud)
在xml中的EditText上.
从java你可以像这样改变它
Drawable img = getContext().getResources().getDrawable( R.drawable.your_other_drawable );
txtVw.setCompoundDrawablesWithIntrinsicBounds( img, null, null, null );
Run Code Online (Sandbox Code Playgroud)
如果您希望编辑框具有与示例图像中相同的圆角/方角,则必须创建自己的背景资源.
| 归档时间: |
|
| 查看次数: |
7095 次 |
| 最近记录: |