標籤:
/*查閱api ---context
1.abstract AssetManager getAssets()
Returns an AssetManager instance for the application‘s package.
得到assets目錄下的資源
2.abstract File getCacheDir()
Returns the absolute path to the application specific cache directory on the filesystem.
得到緩衝目錄
3.abstract PackageManager getPackageManager()
Return PackageManager instance to find global package information.
得到包名 版本號碼的一些資訊
4.abstract String getPackageName()
Return the name of this application‘s package.
abstract String getPackageResourcePath()
Return the full path to this context‘s primary Android package.
5.
abstract FileInputStream openFileInput(String name)
Open a private file associated with this Context‘s application package for reading.
abstract FileOutputStream openFileOutput(String name, int mode)
Open a private file associated with this Context‘s application package for writing.
*/
/*toast*/
1.Toast.makeText(mtext,"Stri ng",Toast.選時間).show
2.mcontext=this ,就是建立一個資料
/*SharedPreferences
Developer Guides
For more information about using SharedPreferences, read the Data Storage developer guide. 從這裡跳轉進去看例子,詳細資料
*/
android API文檔查詢---context、toast、SharedPreferences