使用Drawable资源(摘自android应用开发详解)

1) <ImageView android:id="" android:src="@drawable/g1"/>

2) Resources r = getResources();
   Drawable d = r.getDrawable(R.drawable.moto);      
   myImageView.setImageDrawable(d);


猜你喜欢

转载自xiarihexiang.iteye.com/blog/1622046