zoukankan      html  css  js  c++  java
  • 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.   从这里跳转进去看例子,详细信息

    */

  • 相关阅读:
    vi 命令 使用方法
    再论C++之垃圾回收(GC)
    Iterative (non-recursive) Quick Sort
    DirectSound的应用
    JavaScript也能求爱哦
    lol匹配算法
    一年成为Emacs高手(像神一样使用编辑器)
    SSH深度历险(四) Maven初步学�
    char* 和char[]的差别
    数据仓库与数据挖掘的一些基本概念
  • 原文地址:https://www.cnblogs.com/liangqiyuan/p/5686518.html
Copyright © 2011-2022 走看看