---------------------------main.java----------------------------------
package com.example.likereadert1;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.In...
分类:
其他好文 时间:
2015-04-12 09:14:57
阅读次数:
212
Android 动态计算布局,动态设置显示View.measure(),ViewGroup.addView()方法使用...
分类:
移动开发 时间:
2015-04-11 13:24:43
阅读次数:
214
android:persistentDrawingCache (Google官方译文)
Defines the persistence of the drawing cache. The drawing cache might be enabled by a ViewGroup for all its children in specific situations (for instan...
分类:
移动开发 时间:
2015-04-10 18:00:54
阅读次数:
124
View绘制过程详解界面窗口的根布局是DecorView,该类继承自FrameLayout.说到View绘制,想到的就是从这里入手,而FrameLayout继承自ViewGroup。感觉绘制肯定会在ViewGroup或者View中,
但是木有找到。发现ViewGroup实现ViewParent接口,而ViewParent有一个实现类是ViewRootImpl, ViewGruop中会使用ViewR...
分类:
其他好文 时间:
2015-04-10 15:34:28
阅读次数:
147
三.motionevent的onTouchEvent流程最底层的View的dispatchTouchEvent会调用onTouchListener来进行处理motionevent,或者使用onTouchEvent来处理motionevent,不论哪种都默认会返回true。所以这时ViewGroup的...
分类:
移动开发 时间:
2015-04-10 15:25:45
阅读次数:
149
为什么自定义控件无法显示
自定义控件不显示
忘记在初始化内部元素之后进行 addView() 操作
忘记设置子控件 LayoutParams 宽高
子控件被其它控件所遮盖
自定义控件预览layout
预览layout布局
at android.view.ViewGroup.resetResolvedLayoutDirection(ViewGroup.java:6081)...
分类:
其他好文 时间:
2015-04-09 19:54:00
阅读次数:
164
ViewGroup学习onMeasure()和onLayout()方法自定义View之onMeasure()Android的onLayout、layout方法讲解Android的API之onLayout,onMesasureAndroid的onMeasure和onLayout的说明
分类:
其他好文 时间:
2015-04-09 13:24:57
阅读次数:
112
出处:ViewDragHelper是V4包下的一个文件。我们在自定义ViewGroup的时候,有时候觉得很头疼,其中很大一部分原因就是因为事件处理太麻烦,需要记录大量的成员变量,还有各种判断等等。
Google也感觉到了这个麻烦,所以ViewDragHelper就出现了,ViewDragHelper功能到底是什么呢?从字面意思上看是View拖拽的帮助类,简而言之就是,在简化View拖拽的时候的代码...
分类:
其他好文 时间:
2015-04-09 08:48:41
阅读次数:
130
我创建了1个activity里有4个tab的fragment,假如4个tab为ABCD在tab C中,初始化UI,UI中有一个EditText: public View onCreateView(LayoutInflater inflater, ViewGroup container, Bun...
分类:
其他好文 时间:
2015-04-07 00:42:22
阅读次数:
169