控件自动埋点
来源:互联网 发布:java 约瑟夫环 编辑:程序博客网 时间:2024/04/29 08:42
EventCollection
项目地址:wobuaihuangjun/EventCollection
简介:控件自动埋点
android 控件自动化埋点
控件点击事件埋点策略
- 埋点采用半自动化的方式进行,埋点的界面必须继承自 BaseActivity 或者 BaseFragment ,不含子控件的控件将会自动收集点击事件;
- 埋点统一收集类名+控件的 UI 目录树。
- 需要埋点包含子控件的 Layout 控件,在 .xml 布局文件中添加 android:tag 属性,否则将不会收集,此时子控件的点击事件将会被忽略。tag 的值统一以 click_event 开头。
例如:
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:tag="click_event"> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@mipmap/ic_launcher" /> </LinearLayout> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button" /></LinearLayout>
Button 的点击事件将会自动收集,要收集 LinearLayout 的点击事件,此时必须设置 tag 属性,ImageView 的点击事件将不会再收集。
LinearLayout 的 UI 目录树为:MainActivity:DecorView[0]->LinearLayout[0]->FrameLayout[1]->LinearLayout[0]->LinearLayout[0];
Button 的 UI 目录树为:MainActivity:DecorView[0]->LinearLayout[0]->FrameLayout[1]->LinearLayout[0]->Button[1];
设备不同黑体部分的 UI 路径可能会有所不同
0 0
- 控件自动埋点
- UIScrollView内部子控件自动布局的一些注意点
- android控件自动化埋点统计
- 控件那点事~~~
- FLEX4 屏闭系统右键菜单列表控件DataGrid/Tree/List上点右键时自动选择当前行
- 自动生成服务器控件
- 自动匹配ComboBox控件
- 自动创建控件
- 自动注册MSComm控件
- 自动生成控件求助
- 自动添加控件
- Email自动完成控件
- TDialUp自动拨号控件
- 自动换行控件
- MVC 自动分页控件
- 自动完成控件AutoCompleteTextView
- 对话框控件自动调整
- TextBox自动完成控件
- 内存堆和栈的区别
- SimpleText
- ubuntu16.04 中软件的菜单栏消失不见怎么办
- 程序设计预算法二期末考试
- 解读Linux的文件系统与目录结构
- 控件自动埋点
- Fedora 15/16 安装后需要做的28件事
- MATLAB与C/C++混合编程之MATLAB调用C程序
- JS内存空间
- 本地图片选择库
- 基础的超市管理系统源代码
- java并发——同步工具类
- org.apache.ibatis.exceptions.TooManyResultsException:
- DEV系列--treeList用法