I need load image from assets
I can read text file
but i can not read images and get to BitmapFactory
my simple code
BitmapFactory.decodeFile(resources.getAssets().open("Untitled-1.jpg"));
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Images should be placed in the
/res/drawable-XXX-folders (see this table).If you put them in the
/res/drawable-XX-folder, you can load them (with Java) using something like this to show it in aImageView:If you need it as a
Bitmap-Object, you can use the decodeResource()-methodBitmapFactory-class: