隨筆 - 0, 文章 - 264, 評論 - 170, 引用 - 0
          數(shù)據(jù)加載中……

          Android指向Resource的URI(注:轉(zhuǎn)載于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 小一敗涂地 閱讀(3085) 評論(0)  編輯  收藏 所屬分類: android+移動開發(fā)

          主站蜘蛛池模板: 华宁县| 黑山县| 莲花县| 溧阳市| 白银市| 湘乡市| 周至县| 贵州省| 虞城县| 鹤岗市| 五华县| 伊川县| 高雄市| 句容市| 双桥区| 哈密市| 北安市| 江达县| 石柱| 黄石市| 玉树县| 葫芦岛市| 桂东县| 双柏县| 汝城县| 邵武市| 利津县| 潍坊市| 乌海市| 黄骅市| 岫岩| 左贡县| 莲花县| 镇远县| 田阳县| 黑河市| 潼南县| 聂拉木县| 邵阳县| 桐城市| 纳雍县|