android API文档查询---context、toast、SharedPreferences
/*查阅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的更多相关文章
- Android API 文档 离线秒开方法
http://blog.csdn.net/haifengzhilian/article/details/39898627 也是最近才看Android开发,但是,它的API文档无论是在线还是离线的,实在 ...
- 很安逸的离线API文档查询工具Dash和Zeal
大家开发的时候难免会查询一些文档,看一下API的调用方法等,所以会不同的语言去某一个地方去找,确实很麻烦,今天给大家安逸两款软件,肯定会让你爱不释手! Dash for macOS 官方地址:http ...
- Android API文档
官方API文档: Android官网: https://developer.android.google.cn/index.html (不需要梯子) Android官网: https://develo ...
- android api文档:intent阅读笔记
intent是几大组件之间进行通信的组件.可以包含以下几个部分: component:指明了处理该intent的对象. Action类似于一个函数名,规定了其他部分的对应用法: The action ...
- 通过API文档查询Math类的方法,打印出近似圆,只要给定不同半径,圆的大小就会随之发生改变
package question; import java.util.Scanner; import java.lang.Math; public class MathTest { /** * 未搞懂 ...
- Android,加载离线Android API文档缓慢问题!
解决方法:在host文件末添加如下信息! 0.0.0.0 www.googleapis.com 0.0.0.0 www.google.com 0.0.0.0 www.google-analytics. ...
- Android SDK文档如何查找
肯定很多人都会有疑问,怎样使用Android SDK 文档该如何使用呢?里面有那么多内容,又全是英文的,接下来告诉大家. 以下内容来自网络. ----------------------------- ...
- 提高打开Android本地文档的速度
非常多Android开发人员在參考Android官方API时,都有一个令人头疼的问题:打开一个index.html平均都须要几分钟甚至更长.尤其是在打开API 8以上的版本号的时候.难道是网速不够好? ...
- Android多媒体--MediaCodec 中文API文档
*由于工作需要,需要利用MediaCodec实现Playback及Transcode等功能,故在学习过程中翻译了Google官方的MediaCodec API文档,由于作者水平限制,文中难免有错误和不 ...
随机推荐
- 继承BaseAdapter实现Filterable的adapter类完整示例
转载:http://www.lai18.com/content/1631130.html 目标:自定义ListView项布局通常需要自己实现Adapter,并通过搜索关键字筛选部分数据.且关键字变长变 ...
- Android AIDL 一探究竟
AIDL ---(Android Interface Definition Language)Android接口定义语言 简述: 1.什么时候使用? 通信方式 使用场景 AIDL IPC .多个应用程 ...
- ulua学习笔记(二):官方资料及问题解决方案
uLua&SimpleFramework入门视频教程网盘地址 视频教程地址 http://pan.baidu.com/s/1gd8fG4N游戏框架地址 https://github.com/j ...
- ServletContext1
---------------ConfigServlet.java----------- protected void doGet(HttpServletRequest request, HttpSe ...
- asp.net中application,cookies,stateview,session的使用
Cookie Cookie的用法也和ASP中差不多.比如我们建立一个名为aspcn,值为飞刀的cookie HttpCookie cookie = new HttpCookie["aspcn ...
- linux makefile: c++ 编程_基础入门_如何开始?
学习android 终究还是需要研究一下其底层框架,所以,学习c++很有必要. 这篇博客,算是linux(ubuntu) 下学习 c++ 的一个入门. 刚开始学习编程语言的时候,最好还是使用命令行操作 ...
- file_put_contents() failed to open stream: Permission denied 问题解决
很长时间没有写PHP了,今天突然有个需求要写一个保存文件的功能. function downloadFile( $url , $savePath = '' ) { $fileName = ge ...
- Codeforces Round #325 (Div. 2) C. Gennady the Dentist 暴力
C. Gennady the Dentist Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/586 ...
- Codeforces Round #268 (Div. 1) B. Two Sets 暴力
B. Two Sets Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/468/problem/B ...
- SICP 习题 (1.14)解题总结
SICP 习题 1.14要求计算出过程count-change的增长阶.count-change是书中1.2.2节讲解的用于计算零钱找换方案的过程. 要解答习题1.14,首先你需要理解count-ch ...