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文档,由于作者水平限制,文中难免有错误和不 ...
随机推荐
- 3.x的触摸响应机制
第一种是采用函数回调,主要是用于MenuItem [cpp] view plaincopy // a selector callback void menuCloseCallback(Object* ...
- git 快速入门(二)
一.引子 git代码托管的优秀工具之一, 其工作原理和svn截然不同.一旦拥有主干master分支权限, 只要在本地拉取主干分支, 可以随时随地切换分支. 它拥有众多优点,eg :支持在断网的情况下, ...
- SpringMVC 参考文档
原文地址:http://blog.csdn.net/lufeng20/article/details/7598801
- android常见错误--INSTALL_FAILED_DEXOPT
出现上面的问题,是由于手机的内存不足导致的,需要清理一下手机的内存,然后就可以了
- Centos中安装vim
Centos, 默认没有安装VIM, 所以要当然要安装了, 直接yum install vim是不行的, 首先: yum install vim* 会看到vim-enhanced这个包,没错, 我们要 ...
- Aizu 2305 Beautiful Currency DP
Beautiful Currency Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest ...
- JNI总结(一)
JNI 是 Java平台中的一个强大特性.应用程序能够通过 JNI把 C/C++代码集成进 Java程序中.通过 JNI.开发人员在利用 Java平台强大功能的同一时候,又不必放弃对原有代码的投资.由 ...
- [Bootstrap] 1. container & container-fluid
Container: 居中 <!DOCTYPE html> <html> <head> <title>Blasting Off With Bootstr ...
- [AngularJS] Transclude -- using what existing in DOM to replace the template elements in directive
var app = angular.module("phoneApp", []); app.controller("AppCtrl", function($sc ...
- 代理模式及其在spring与struts2中的体现
代理模式 代理模式有三个角色组成: 1.抽象主题角色:声明了真实主题和代理主题的共同接口. 2.代理主题角色:内部包含对真实主题的引用,并且提供和真实主题角色相同的接口. 3.真实主题角色:定义真实的 ...