I've different sizes of images available under drawable, drawable-hdpi,
drawable-xhdpi, drawable-xxhdpi etc.. and I'm using below snippet to
retrieve the images' resource id in my android app.
int resid = res.getIdentifier("com.mypackage:drawable/" +
selectedItem.getImageName(), null, null);
does this (getItentifier) method grantees that the respective image resource id
(that suits the screen size of the device that runs this application) gets
retrieved?
eg:- when the app is running on a phone, resource id of the image in the
drawable-hdpi folder is retrieved.
When the application runs on a tab, it returns the resource id of the image in
the drawable-xhdpi (etc..)
--
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/android-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/68357232-31e6-4975-bb4c-27acc4882604%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.