读书人

取途径

发布时间: 2012-08-13 13:21:53 作者: rapoo

取路径

1. 取/data/data/cn.com.mm.pic.love/files 的代码

this.getFilesDir().toString()


2. 取/sdcard 的代码

Environment.getExternalStorageDirectory()


3 。取string.xml 中 ID的方法   的代码

<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_url">http://ssssssssssssssss.com/app.php</string>
</resources>

getResources().getString(R.string.app_url)


读书人网 >移动开发

热点推荐