在同一个页面有多个点击事件时,我们通常都是直接这样case分别处理
但是像我这个case特别多
附上对应xml文件
<LinearLayout android:id="@+id/sjjk_activity_bottom" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/black" android:orientation="horizontal"> <Button android:id="@+id/history_data" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@color/purple_700" android:text="查看历史数据" android:textColor="@color/white"></Button> &