定义: A StateListDrawable is a drawable object defined in XML that uses a several different images to represent the same graphic, depending on the state of the object. For example, a Button widget ca
定义:图层数组,根据先后顺序,越往后,图层越在顶部。 A LayerDrawable is a drawable object that manages an array of other drawables. Each drawable in the list is drawn in the order of the list—the last drawable in the list is
如果资源文件里面有很多张命名规范的图片,可以使用下面的api循环获取 int resId = getResources().getIdentifier("slide" + i, "drawable", getPackageName()); imageView.setImageResource(resId);