Sunday, March 2, 2014

Import pictures on android sports R.drawable.xxx problem


I am a novice;
In a recent study done ImageView, import your own pictures methods are directly under the res pictures onto drawable_mdpi file folder;
Layout layout layout files written under the.



When src under main.java, and wanted to write an array of a picture id, and easy to use

int [] images = new int [] {
R.drawable.bump_mdpi,
R.drawable.calculator_mdpi,
R.drawable.calendar_mdpi,
R.drawable.camcorder_mdpi

};
bump_mdpi, calculator_mdpi, calendar_mdpi, camcorder_mdpi these four images are placed in the drawable. But R.drawable.xxx in (automatic text box does not display the pictures I wanted id); Here is my way to import pictures wrong? . Java file does not automatically generate a variable of this image;

But I
in xml

No comments:

Post a Comment