目标效果:
运行打开开关,下边的时间选择会显示,当前时间09:56,选择09:57后,会发现马上弹出选择的时间日志数据,过一会到了09:57后,会发现每一秒都调用打印日志信息的方法,点击关闭开关,停止打印。
1.activity_main.xml页面设置布局,并隐藏下方的时间选择。
activity_main.xml页面:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_heig