我有两种不同的"样式" (边框宽度和颜色)我想应用于EditText和ImageView。他们建议我将它们添加到drawable / my_shape.xml
中<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
......>
<solid android:color="#FFFFFF" />
<stroke ..... />
<padding .... />
</shape>
我想知道,我怎么能:
- create different border width and colour for ImageView and EditText? Should I somehow specify a target type?
- as far as I understand, those "styles" will be applied to ... each control?
- how can I apply them to a particular EditText or ImageView?