![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
android开发
Eileng
奔跑吧, 油菜
展开
-
Android touch事件传输过程
一、先看看整理流程图:二、事件从Framework层如何传到UI进程实际上就是实际从 WindowManagerService 传递到ViewRootImpl层。我们在ViewRootImpl 可以看到这几个属性: InputChannel mInputChannel; //输入事件channel InputQueue.Callback mInputQueueCallback; //队...原创 2018-06-22 14:23:27 · 849 阅读 · 0 评论 -
Android View的加载流程
要说Android view加载流程,首先,我们需要清楚的理解什么是View、Window、Activity 以及三着有着什么样的关系。一、什么是Activity?看看源码中对Activity的描述: * An activity is a single, focused thing that the user can do. Almost all * activities interact wi...原创 2018-05-25 16:50:12 · 2663 阅读 · 0 评论 -
从IntentService谈Android消息分发机制
1、创建线程2、在线程开始运行的时候,通过Looper.prepare() 创建消息队列。中间涉及到ThreadLocal,保证了该线程只能有一个Looper和一个消息队列。3、然后Looper.loop(); 开始了无限循环模式,不断从MessageQueue中获取消息,然后调用Message的target 的dispatchMessage 处理消息。MessageQueue也在不断的循...原创 2018-05-25 16:45:21 · 313 阅读 · 0 评论 -
keras模型保存为tensorflow的二进制模型
keras 模型转换为pbtensorflow加载已有的二进制模型原创 2017-10-20 19:19:41 · 10148 阅读 · 13 评论 -
android app前后台判断
判断是APP是否在后台:public static boolean isAppInBackground(Context context) { ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); if (Build.VERSI原创 2017-06-28 14:10:11 · 410 阅读 · 0 评论 -
Android 程序在后台保活
关于android进程:1.前台进程(Foreground process) 2、可见进程3、服务进程4、空进程要避免被回收,首先就要提高进程级别。1、oom_adj oom_adj 的值越小, 就越不容易被后台回收 static final int PERCEPTIBLE_APP_ADJ = 2; // This is原创 2017-06-19 11:45:59 · 601 阅读 · 0 评论 -
Andoird-接入微信分享
微信分享重点说明无法弹出分享页面的情况转载 2017-04-24 16:12:24 · 251 阅读 · 0 评论 -
AsyncTask 使用注意
AsyncTask 使用注意原创 2017-02-06 11:07:47 · 157 阅读 · 0 评论 -
ViewPager嵌套使用SwipeRefreshLayout下拉功能不能使用
问题描述: 在ViewPager的子VIew中, 嵌套使用SwipeRefreshLayout, 发现SwipeRefreshLayout的下拉功能时而就不能使用。 原因:down vote It is because there is a bug in SwipeRefreshLayout! The bug is “onRefresh doesn’t work proper转载 2017-02-06 10:41:29 · 884 阅读 · 0 评论 -
Android View 绘制源码分析
本篇文章主要内容是:详细讲述View的测量(Measure)流程从ViewRootImpl#performTraversals说起先来看看performMeasure(childWidthMeasureSpec, childHeightMeasureSpec)这个方法,它传入两个参数,分别是childWidthMeasureSpec和childHeightMeasure,那么这两个参数代表...原创 2018-06-22 14:47:29 · 254 阅读 · 0 评论