je dois ouvrir une intention d'afficher une image comme suit:comment obtenir une uri d'une ressource d'image dans Android
Intent intent = new Intent(Intent.ACTION_VIEW);
Uri uri = Uri.parse("@drawable/sample_1.jpg");
intent.setData(uri);
startActivity(intent);
Le problème est que Uri uri = Uri.parse("@drawable/sample_1.jpg");
est incorrect.
Est-ce que ça marche pour quelqu'un ?? –
il a obtenu 21 upvotes, donc je suppose oui – Axarydax
Uri path = Uri.parse ("android.resource: //net.londatiga.android.twitpic/" + R.drawable.icon); \t Chaîne mpath = path.toString(); Je reçois aucune telle erreur de dossier ou de répertoire quand je fais ceci –