摘要: 一、定义 PendingIntent表示待定、等待、即将发生的意思。Intent表示的是立刻发生。 PendingIntent的主要方法: int requestCode:表示请求码,跟intent是一样的。 int flags:常见的类型 FLAG_ONE_SHOT:当前描述的PendingInt 阅读全文
posted @ 2016-04-24 16:49 技术丶从积累开始 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 一、RemoteViews简介 作用:跨进程更新界面 使用场景:通知栏、桌面小部件 二、在通知栏上的应用 原理:通过RemoteViews加载布局,通过remoteViews的set方法,载入View动态改变布局 (一)、Notifaction的使用:Notification的使用 (二)、利用Re 阅读全文
posted @ 2016-04-24 16:14 技术丶从积累开始 阅读(1545) 评论(0) 推荐(0) 编辑
摘要: 一、在LV16以前的用法 public class MainActivity extends Activity { private NotificationManager notificationManager; @Override protected void onCreate(Bundle sa 阅读全文
posted @ 2016-04-24 15:51 技术丶从积累开始 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 项目:具有圆形效果的自定义View 一、继承View并重写onDraw方法 public class CircleView extends View{ private static final int COLOR = Color.RED; private Paint mPaint = new Pai 阅读全文
posted @ 2016-04-24 14:54 技术丶从积累开始 阅读(1862) 评论(0) 推荐(0) 编辑
摘要: 1、当View的measure被确定后,会调用ViewGroup的layout方法,之后使用onLayout方法(同样也是系统未自动重写,要我们自己完成)遍历子View(根Measure的形式是一样得)与Measure不同的时候,允许重写layout()方法。 分析layout源码:(P194 ①) 阅读全文
posted @ 2016-04-24 13:57 技术丶从积累开始 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 一、认识ViewRoot和DecorView 当Activity对象被创建的时候,会将DecorView添加到Window中,同时创建ViewRootImpl对象(ViewRoot对应于ViewRootImpl类),两者互相建立关系。 通过ViewRoot调用performTranversals开始 阅读全文
posted @ 2016-04-24 12:44 技术丶从积累开始 阅读(704) 评论(0) 推荐(0) 编辑