Android Resource Id to Uri

The format is: android.resource://[package]/[res id]

举个例子:

String defaultUri = Uri.parse("android.resource://han.kunpeng.launcher/" + R.drawable.the_music_default).toString();
Log.d("Id2Uri", "The default uri is " + defaultUri);

你可能感兴趣的:(Android Resource Id to Uri)