本文大部分参考自 http://blog.csdn.net/mayingcai1987/article/details/6200909 ,对原文中的讲解FLAG_NEW_TASK地方加了一些自己的观点,用红色标记 1. Task是包含一系列Activity的堆栈, 遵循先进后出原则. 2. Task默认行为: (1) 前提: Activity A和Activity B在同一个应用中. 操作: Activity A启动开僻Task堆栈(堆栈状态: A), 在Activity A中启动Activit…
转自:http://blog.csdn.net/t12x3456/article/details/7688154 1.什么是Intent Intent是一种运行时绑定(run-time binding)机制,它能在程序运行过程中连接两个不同的组件.通过Intent,你的程序可以向Android表达某种请求或者意愿,Android 会根据意愿的内容选择适当的组件来完成请求.比如,有一个Activity希望打开网页浏览器查看某一网页的内容,那么这个Activity只需要发出 WEB_SEARCH_A…
http://www.oschina.net/question/565065_67909 http://www.cnblogs.com/hummersofdie/archive/2011/02/12/1952675.html 下面是常用到的Intent的URI及其示例,包含了大部分应用中用到的共用Intent.一.打开一个网页,类别是Intent.ACTION_VIEW Uri uri = Uri.parse("http://blog.3gstdy.com/"); Intent int…
上一期学习了Intent的前三个属性,本期接着学习其余四个属性,以及Android系统常用内置组件的启动. 四.Data和Type属性 Data属性通常用于向Action属性提供操作的数据.Data属性接受一个Uri对象,一个Uri 对象通常通过如下形式的字符串来表示: content://com.android.contacts/contacts/1 tel:123 Uri字符串总满足如下格式: scheme://host:port/path 例如上面给出的 content://com.and…
Android中Context详解 ---- 你所不知道的Context(转)                                               本文出处 :http://blog.csdn.net/qinjuning 前言:本文是我读<Android内核剖析>第7章 后形成的读书笔记 ,在此向欲了解Android框架的书籍推荐此书. 大家好,  今天给大家介绍下我们在应用开发中最熟悉而陌生的朋友-----Context类 ,说它熟悉,是应为我们在开发中 时刻的在与它…
这个文章主要是讲Android开发的四大组件,本文主要分为 一.Activity详解二.Service详解三.Broadcast Receiver详解四.Content Provider详解外加一个重要组件 intent的详解. 一.Activity详解Activty的生命周期的也就是它所在进程的生命周期.   一个Activity的启动顺序: onCreate()——>onStart()——>onResume() 当另一个Activity启动时:第一个Activity onPause()——…
Intent知识详解 一.什么是Intent 贴一个官方解释: An intent is an abstract description of an operation to be performed. It can be used with Context#startActivity(Intent) to launch an android.app.Activity , broadcastIntent to send it to any interested BroadcastReceiver…
首先说一下canvas类: Class Overview The Canvas class holds the "draw" calls. To draw something, you need 4 basic components: A Bitmap to hold the pixels, a Canvas to host the draw calls (writing into the bitmap), a drawing primitive (e.g. Rect, Path, t…
android屏幕适配详解 官方地址:http://developer.android.com/guide/practices/screens_support.html 一.关于布局适配建议 1.不要使用绝对布局 2.尽量使用match_parent 而不是fill_parent . 3.能够使用权重的地方尽量使用权重(android:layout_weight) 4.如果是纯色背景,尽量使用android的shape 自定义. 5.如果需要在特定分辨率下适配,可以在res目录上新建layout…
转载请标明出处:http://blog.csdn.net/zhaoyanjun6/article/details/78112003 本文出自[赵彦军的博客] 一:概述 相信大家在使用Android Studio的时候,或多或少的会使用一些插件,适当的配合插件可以帮助我们提升一定的开发效率,更加快乐.例如: https://github.com/zzz40500/GsonFormat 可以帮助我们从Gson转化为实体类 https://github.com/avast/android-butter…