隨筆 - 0, 文章 - 264, 評論 - 170, 引用 - 0
          數據加載中……

          Android指向Resource的URI(注:轉載于http://hi.baidu.com/zhoutianyang/blog/item/1a4d56df5979551f485403de.html)

          A Uri object can be used to reference a resource in an APK file. The Uri should be one of the following formats:

          • android.resource://package_name/id_number
            package_name is your package name as listed in your AndroidManifest.xml. For example com.example.myapp
            id_number is the int form of the ID.
            The easiest way to construct this form is
            Uri uri = Uri.parse("android.resource://com.example.myapp/" + R.raw.my_resource");
          • android.resource://package_name/type/name
            package_name is your package name as listed in your AndroidManifest.xml. For example com.example.myapp
            type is the string form of the resource type. For example, raw or drawable. name is the string form of the resource name. That is, whatever the file name was in your res directory, without the type extension. The easiest way to construct this form is
            Uri uri = Uri.parse("android.resource://com.example.myapp/raw/my_resource");

          posted on 2010-11-21 13:56 小一敗涂地 閱讀(3087) 評論(0)  編輯  收藏 所屬分類: android+移動開發(fā)

          主站蜘蛛池模板: 普兰县| 武宁县| 三明市| 安阳市| 景德镇市| 陇西县| 岑巩县| 吉木乃县| 招远市| 云梦县| 临澧县| 随州市| 姚安县| 来凤县| 招远市| 涿州市| 阿城市| 台州市| 岚皋县| 桑植县| 辽宁省| 崇文区| 万源市| 惠东县| 长治县| 封开县| 临夏市| 无棣县| 宣汉县| 南开区| 邹城市| 丰宁| 通州市| 绵竹市| 高雄市| 砀山县| 宿州市| 宁国市| 龙南县| 昌乐县| 恩施市|