- 博客(11)
- 资源 (3)
- 问答 (1)
- 收藏
- 关注
原创 View的工作流程
1.View的工作流程measure 测量View的宽高;measure完成之后,通过getMeasuredWidth(),getMeasuredHeight()可以获取控件的宽高,大部分View宽高就是测量的宽高 layout 确定View在父容器中放置的位置,四个顶点坐标及View实际宽高 完成后可通过getTop(),getBottom(),getLeft(),getRight()获取
2016-09-27 09:44:04 382
原创 MeasureSpec解析
MeasureSpec测量规格/** * A MeasureSpec encapsulates the layout requirements passed from parent to child. * MeasureSpec是父控件传给子控件的布局条件 * Each MeasureSpec represents a requirement for either the width or t
2016-09-27 09:38:54 1041
原创 java二进制、八进制、十六进制间转换详细
1.各进制表示java里不能使用前置表示2进制,只能是 8,10,16进制 8: 前置 0 10: 不需前置 16: 前置 0x 或者 0Xpublic class test { public static void main(String[] args) { int octalB = 012; i
2016-09-21 17:26:58 24339 7
原创 java位运算示例
左移、右移、无符号右移左移int型在java中占4个字节共32位 测试代码public class test { public static void main(String[] args) { System.out.println("---------左移--------"); //-----------正数左移-------------
2016-09-21 14:18:01 481
原创 MVP 谷歌demo小解(三)
官方项目地址https://github.com/googlesamples/android-architecture项目结构图 Project视图下src/main-项目路径src/androidTest-UI层测试src/androidTestMock-UI层测试mock数据支持src/test-业务层单元测试src/mock-业务层单元测试mock数据支持项目包是按功能来划分的,
2016-09-19 14:21:00 978 2
原创 MVP 实现原理及简单案例登陆(二)
MVP概述Model层主要处理与数据相关的操作,如操作数据库、请求服务器等。不与View层直接交互,通过Presenter层与View层互动。View层显示界面,对外提供可刷新UI的接口,不做控制操作。如点击登陆按钮后,弹出等待进度框,View层只提供了一个弹出等待进度框的方法,调用弹出是Presenter层通过View的方法调用的(后面会详细介绍)Presenter层Presenter层负责与Mo
2016-09-13 14:03:00 658 1
转载 android-architecture
Android Architecture Blueprints [beta]The Android framework offers a lot of flexibility when it comes to defining how to organize and architect an Android app. This freedom, whilst very valuable, can
2016-09-12 11:32:24 360
原创 MVP android-architecture README解析(一)
项目地址 https://github.com/googlesamples/android-architecture概述基于README.md的翻译 Android Architecture Blueprints [beta] android结构设计图[测试版] The Android framework offers a lot of flexibility when it comes t
2016-09-12 10:59:53 411
原创 Dialog工具类
一直在优化工具类的代码这个是现在使用的最终版,功能还是比较强大的代码CustomDialog .java/** * @author :renpan * @version :v1.0 * @class : * @date :2014-04-12 15:47 * @description:弹出框类 */public class CustomDialog extends Dialog {
2016-09-09 09:39:21 593
原创 Toast工具类
主要代码public class ToastUtils { /** * toast实例 */ private static Toast instance = null; private static Context context = null; private static TextView sTvMsg; private static
2016-09-08 15:56:08 242
原创 android studio通过maven加载进来的lib在哪?
描述记不住,每次都忘,记不住,每次都忘,记不住,每次都忘,解决方案打开项目>External Libraries>选中jar包右击>Library Properties就可以看见了
2016-09-02 14:19:55 1701
TA创建的收藏夹 TA关注的收藏夹
TA关注的人