参考链接:http://blog.csdn.net/jjwwmlp456/article/details/41076699
简介
Android提供了用于构建UI的强大的组件模型。两个基类:View和ViewGroup。
可用Widget的部分名单包括Button, TextView, EditText, ListView, CheckBox,RadioButton, Galle...
分类:
移动开发 时间:
2014-11-21 16:22:45
阅读次数:
325
Android时间分发View的时间分发过程dispatchTouchEvent —> onTouch –-> onTouchEvent /** * Pass the touch screen motion event down to the target view, or this * view ...
分类:
移动开发 时间:
2014-11-17 22:38:59
阅读次数:
429
如何动态设置ImageView的宽高以及位置package com.pic;import android.app.Activity;import android.os.Bundle;import android.util.Log;import android.view.ViewGroup.Layou...
分类:
其他好文 时间:
2014-11-17 12:13:20
阅读次数:
196
Android系统虽然自带了很多的组件,但肯定满足我们个性化的需求,所以我们为了开发方便,需要自定义Android的UI组件,以实现我们个性化的需求。
自定义组合控件的步骤:
1 、自定一个View,需要继承相对布局,线性布局等ViewGroup的子类。ViewGroup是一个其他控件的容器,能够乘放各种组件。
2 、实现父类的3个构造方法。一般需要在构造方法里始化初自定义布局文件。
...
分类:
移动开发 时间:
2014-11-16 12:07:31
阅读次数:
229
无法响应点击事件OnItemClickListener
android:descendantFocusability="blocksDescendants"即可。这样Item Layout就屏蔽了所有子控件获取Focus的权限,
beforeDescendants:viewgroup会优先其子类控件而获取到焦点
afterDescendants:viewgrou...
分类:
其他好文 时间:
2014-11-13 19:02:10
阅读次数:
196
Android 中与 Touch 事件相关的方法包括:dispatchTouchEvent(MotionEvent ev)、onInterceptTouchEvent(MotionEvent
ev)、onTouchEvent(MotionEvent ev);能够响应这些方法的控件包括:ViewGroup、View、Activity。方法与控件的对应关系如下表所示:
T...
分类:
移动开发 时间:
2014-11-13 16:46:36
阅读次数:
191
layout(布局)定义了用户界面的可视化结构(visual structure),如Activity的UI,应用窗口的UI。 有两种方式声明layout: 1.在xml文件中声明UI组件。 2.在运行时,实例化布局元素。我们可以以编码的方式创建View或ViewGroup对象,操纵它们的属性。 ....
分类:
移动开发 时间:
2014-11-11 22:27:00
阅读次数:
318
上一篇文章主要讲述了Android的TouchEvent的分发过程,其中有两个重要的函数:onInterceptTouchEvent和onTouchEvent,这两个函数可被重装以完成特定的逻辑。onInterceptTouchEvent的定义为于ViewGroup中,默认返回...
分类:
移动开发 时间:
2014-11-11 19:26:17
阅读次数:
249
BaseAdapter适配器里有个getView()需要重写public View getView(int position,View converView,ViewGroup parent){ //省略。。}请问这个方法的三个参数是什么意思?作用是什么? 我不要简单的翻译哈,最好举个例子具体用法....
分类:
移动开发 时间:
2014-11-10 21:21:30
阅读次数:
186