//我的代码就像:
enum Quality{
usable, clean, dirty, inevitable;
}
public class Wc {
public String address;
public Image image;
public Quality quality;
public Wc(String st,Image im,Quality q){
address=st;
image=im;
quality=q;
}
}
//我应该如何使用构造函数或为其提供图像路径?
答案 0 :(得分:0)
public myClass extends Activity{
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bitmap image1 = BitmapFactory.decodeResource(this.getResources(),
R.drawable.image1);
Wc wc = new Wc(yourString,image1, yourQuality);
}
}