首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

Android事件传送机制【Touch事件】

2012-07-28 
Android事件传递机制【Touch事件】?Android中提供了ViewGroup、View、Activity三个等级的Touch事件处理。也就是

Android事件传递机制【Touch事件】

?

Android中提供了ViewGroup、View、Activity三个等级的Touch事件处理。也就是说,这三个地方都有事件回调方法。
测试DEMO视图结构:<com .orgcent.eventtest.EventLinearLayout?xmlns:android="http://schemas.android.com/apk/res/android"? ? android:layout_width="fill_parent"? ? android:layout_height="fill_parent"? ? android:background="#032d3d"? ? android:orientation="vertical" >? ? <com .orgcent.eventtest.EventTextView? ? ? ? android:id="@+id/tvEvent"? ? ? ? android:layout_width="fill_parent"? ? ? ? android:layout_height="100dp"? ? ? ? android:gravity="center"? ? ? ? android:textColor="@android:color/black"? ? ? ? android:background="@android:color/white"? ? ? ? android:text="Activity - ViewGroup - View Event http://orgcent.com dispatch Test"/></com>至于三者之间的执行顺序,将在下面详细阐述:
原文地址:Android事件传递机制【Touch事件】?|?http://orgcent.com/android-touch-event-mechanism/

热点排行