Hi all,
I tried to show a picture in local file system in a imageswitcher.
But I could see nothing but a black screen in fact.
Here is my code:
public void onItemSelected(AdapterView parent, View v, int
position, long id) {
Uri imageUri = Uri.fromFile(imageFileDir.listFiles()[position]);
/*
imageUri has the value of "file:///data/data/
com.Android.Hust.PoliceMap/app_c/2.jpg", and the file 2.jpg exists
indeed.
*/
mSwitcher.setImageURI(imageUri);
}
When I debugged it, it showed me the message "resolveUri failed on bad
bitmap uri: file:///data/data/com.Android.Hust.PoliceMap/app_c/2.jpg".
Is anyone can tell me how to solve this problem and show my picture
in the Emulator?
Thank you in advance!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---