随笔分类 -  android

涉及开放方面的心得。
摘要:阅读:http://developer.android.com/guide/topics/data/data-storage.html主要类型有:Shared Preferences 使用键值对存储Internal Storage 在内存存储私人数据。External Storage 在内存存储共用的数据。SQLite Databases 使用内部数据库。Network Connection 网络连接来存储。使用Shared Preferences可以通过以下方式获取SharedPreferences: getSharedPreferences() - Use this if you need 阅读全文
posted @ 2013-10-25 19:54 yutoulck 阅读(702) 评论(0) 推荐(0)
摘要:阅读:http://developer.android.com/guide/topics/graphics/overview.htmlAnimation:The Android framework provides two animation systems: property animation (introduced in Android 3.0) and view animation. Both animation systems are viable options, but the property animation system, in general, is the prefe 阅读全文
posted @ 2013-10-25 19:03 yutoulck 阅读(223) 评论(0) 推荐(0)
摘要:阅读:http://developer.android.com/guide/topics/resources/accessing-resources.htmlAlthough the R class is where resource IDs are specified, you should never need to look there to discover a resource ID. A resource ID is always composed of:The resource type: Each resource is grouped into a "type,&q 阅读全文
posted @ 2013-10-24 22:14 yutoulck 阅读(168) 评论(0) 推荐(0)
摘要:阅读:http://developer.android.com/guide/topics/resources/providing-resources.html安卓开发的文件结构及其含义:DirectoryResource Typeanimator/XML files that define property animations.anim/XML files that define tween animations. (Property animations can also be saved in this directory, but the animator/ directory is 阅读全文
posted @ 2013-10-24 21:52 yutoulck 阅读(163) 评论(0) 推荐(0)
摘要:阅读:http://developer.android.com/guide/components/processes-and-threads.htmlWhen an application component starts and the application does not have any other components running, the Android system starts a new Linux process for the application with a single thread of execution. By default, all compone 阅读全文
posted @ 2013-10-24 21:30 yutoulck 阅读(182) 评论(0) 推荐(0)
摘要:阅读:http://developer.android.com/guide/components/intents-filters.htmlintent可以用在:1、Context.startActivity() or Activity.startActivityForResult() ;2、Context.startService() 、Context.bindService() 。3、Intent objects passed to any of the broadcast methods (such as Context.sendBroadcast(), Context.sendOrder 阅读全文
posted @ 2013-10-24 20:25 yutoulck 阅读(217) 评论(0) 推荐(0)
摘要:阅读:http://developer.android.com/guide/topics/providers/content-providers.htmlWhen you want to access data in a content provider, you use the ContentRe... 阅读全文
posted @ 2013-10-22 16:13 yutoulck 阅读(335) 评论(0) 推荐(0)
摘要:阅读:http://developer.android.com/guide/components/bound-services.htmlA bound service is an implementation of theServiceclass that allows other applications to bind to it and interact with it. To provide binding for a service, you must implement theonBind()callback method. This method returns anIBinde 阅读全文
posted @ 2013-10-21 22:14 yutoulck 阅读(227) 评论(0) 推荐(0)
摘要:阅读:http://developer.android.com/guide/components/services.htmlServices是一个长时间操作而且不提供界面的组件。程序里其他的组件都能够启动它并且就算用户切换了其他的程序,Services也仍然运行着。StartedA service is "started" when an application component (such as an activity) starts it by callingstartService(). Once started, a service can run in the 阅读全文
posted @ 2013-10-20 22:10 yutoulck 阅读(397) 评论(0) 推荐(0)
摘要:阅读:http://developer.android.com/guide/components/tasks-and-back-stack.htmlandroid通过Task来实现尽管调用了不同程序的Activity但是却让你有一种其他程序的Activity是当前程序的一部分(例如发邮件例子)。Task就是用户在执行某个任务时各种Activity的集合。The device Home screen is the starting place for most tasks. When the user touches an icon in the application launcher (or 阅读全文
posted @ 2013-10-20 13:00 yutoulck 阅读(245) 评论(0) 推荐(0)
摘要:阅读:http://developer.android.com/guide/components/fragments.htmlA fragment must always be embedded in an activity and the fragment's lifecycle is directly affected by the host activity's lifecycle. For example, when the activity is paused, so are all fragments in it, and when the activity is 阅读全文
posted @ 2013-10-19 22:19 yutoulck 阅读(447) 评论(0) 推荐(0)
摘要:阅读:http://developer.android.com/guide/components/activities.htmlAn application usually consists of multiple activities that are loosely bound to each other. Typically, one activity in an application is specified as the "main" activity, which is presented to the user when launching the appl 阅读全文
posted @ 2013-10-19 17:19 yutoulck 阅读(663) 评论(0) 推荐(0)
摘要:阅读:http://developer.android.com/guide/components/fundamentals.htmlWhen the system starts a component, it starts the process for that application (if it's not already running) and instantiates the classes needed for the component. For example, if your application starts the activity in the camera 阅读全文
posted @ 2013-10-19 15:57 yutoulck 阅读(201) 评论(0) 推荐(0)
摘要:2013.12.01更新阅读:http://www.zhihu.com/question/21074979从su说起。SU:( Switch user切换用户),用户通过该命令可进行用户切换,该文件一般位于/system/bin或者/system/xbin/目录下,拥有者和群组均为ROOT。Linux下su以后输入密码就可以root了,但Android里的su和Linux里的su是不一样的,Android里的su不是靠验证密码的,而是看你原来的权限是什么。意思就是如果你是root,那你可以通过su切换到别的用户,比如说shell,wifi,audio什么的。但如果你是root之外的其他用户,就 阅读全文
posted @ 2013-10-19 11:33 yutoulck 阅读(462) 评论(0) 推荐(0)
摘要:此文为阅读官方指南http://developer.android.com/guide/components/tasks-and-back-stack.html之后的理解最简单的莫过于Back Stack,其实它就是一个栈,当你从一个Activity不断打开另外的一些Activity的时候,就不断的入栈,按退后键的时候就不断出栈。操作的过程中还有主页键,当你按下去的时候并不代表所有栈就出栈出完了,事情并不是这么简单,下面就进行讲解。当你启动了A应用之后,按下主页键的时候,当前A应用的的Task只是从foreground进入了background,并没有消失,此时当你打开B应用的时候,B应用的T 阅读全文
posted @ 2013-07-22 13:12 yutoulck 阅读(198) 评论(0) 推荐(0)
摘要:全部都是阅读官方阅读之后的理解,官方指南在此:http://developer.android.com/guide/components/activities.htmlActivity的注册:这是必须做的,但是分两种,一种是如果需要响应他人的广播,也就是说如果改activity有被其他应用调用的可能的话,那就就必须在注册那里加上另外一种是,只需要被自己的应用调用的话,就不用了。被启动的Activitiy的分类:分为两种,一直是被启动的Activity与当前Activity并没有结果上的关系,那么直接使用startActivity(intent)即可;另外一种是需要从被启动的Activity获取 阅读全文
posted @ 2013-07-22 12:49 yutoulck 阅读(336) 评论(0) 推荐(0)
摘要:在activity嵌套activity在谷歌看来是不符合标准的,所以Fragment出现了。从为了解决activity嵌套activity问题的方面来看,1、Fragment跟activity很类似;2、Fragment存在于activity里。1、Fragment跟activity很类似这个从生命周期就能看出来,它的生命周期可从官方指南看到:http://developer.android.com/guide/components/fragments.html不清楚的可以百度下,有很多这里就不再累述。2、Fragment存在于activity里:所以怎么管理、使用Fragment就成为了接下 阅读全文
posted @ 2013-05-15 22:48 yutoulck 阅读(591) 评论(0) 推荐(0)