2019年11月20日
摘要: 2019-11-20 19:15:56 代码来自github,忘记是谁写的了,底子不错,适当做了点修改 ShadowContainer 1 package com.example.android_research; 2 3 import android.content.Context; 4 impo 阅读全文
posted @ 2019-11-20 19:18 wlrhnh 阅读(308) 评论(0) 推荐(0) 编辑
2019年10月12日
摘要: 2019-10-12 15:58:05 一、纯SDK实现: 1、直接使用SDK提供的API,代码如下: 2、Delegate及包装类代码: 二、使用Intl库 1、创建一个独立的dart字符串类,便于生产arb文件,如下: 2、Delegate及包装类代码: 3、最终的代码结构图: 阅读全文
posted @ 2019-10-12 16:07 wlrhnh 阅读(493) 评论(0) 推荐(0) 编辑
2019年9月14日
摘要: 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 // for details. All rights reserved. Use of this source code is governed by a 3 // BSD-style license that can b... 阅读全文
posted @ 2019-09-14 21:29 wlrhnh 阅读(1072) 评论(0) 推荐(0) 编辑
2019年9月11日
摘要: 2019-09-11 14:21:09 阅读全文
posted @ 2019-09-11 14:22 wlrhnh 阅读(233) 评论(0) 推荐(0) 编辑
2019年1月10日
摘要: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 以下源码基于Gingerbread 2.3.7 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1、先看ViewGroup的dispatchOnTouchEvent(MotionEvent e)的源码 1.1 主要是获取一些坐标 阅读全文
posted @ 2019-01-10 20:02 wlrhnh 阅读(296) 评论(0) 推荐(0) 编辑
2018年6月4日
摘要: 2018-06-04 19:57:49 这几天研究了一下JNI,其实以前也看过,总感觉理解没那么透彻,这次优化时间看了看,做点记录~ 1、JNI是什么?存在的意义是什么? Java Native Interface,Java本地接口。作用是实现Java代码和Native代码(C、C++、汇编语言)之 阅读全文
posted @ 2018-06-04 20:57 wlrhnh 阅读(372) 评论(0) 推荐(0) 编辑
2018年5月31日
摘要: 2018-05-31 17:23:46 Note: 这里的源码来自Android 2.3.6,这个版本的代码比较简单,适合理解Touch事件的传递原理。后续版本源码复杂了很多,但是原理都是类似的。 2个方法源码较多,在这里记录下。 View.java 1 /** 2 * Implement this 阅读全文
posted @ 2018-05-31 17:25 wlrhnh 阅读(159) 评论(0) 推荐(0) 编辑
2017年8月28日
摘要: 1、自定义Dialog,构造器中使用Theme,如下: 觉得这种方式使用的挺优雅的,比较有意思。 theme_manage_dialog.xml manage_dialog_anim.xml push_up_in.xml push_up_out.xml 阅读全文
posted @ 2017-08-28 18:01 wlrhnh 阅读(180) 评论(0) 推荐(0) 编辑
2017年8月18日
摘要: 1、关于Android系统中不同的定位模式 Android系统中包括3中定位模式: 同时使用GPS、WIFI及基站定位,速度快、精度高,室内定位效果好。 缺点:耗流量、耗电量 只使用WIFI和基站定位,需要WIFI或者基站才行,室内效果好。 缺点:依赖WIFI或基站,精度一般 不依赖WIFI和基站, 阅读全文
posted @ 2017-08-18 15:31 wlrhnh 阅读(25230) 评论(0) 推荐(1) 编辑
2017年8月15日
摘要: 2017-08-14 21:44:23 有很多中情况,分别展示。 1、Activity不做任何设置,布局使用LinearLayout 会自动滚动EditText之上的所有View,代码: 效果图: 2、Activity不做任何设置,布局使用RelativeLayout、FrameLayout 使用R 阅读全文
posted @ 2017-08-15 09:59 wlrhnh 阅读(1190) 评论(0) 推荐(0) 编辑