展示效果图:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:id="@+id/activity_main"
android:layout_width="match_parent" android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:orientation="vertical"
tools:context="com.example.alarmandnotice_android.MainActivity">
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="设置闹钟"
android:onClick="setAlarmOne"
/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="setAlarmCycle"
android:text="设置闹钟(周期)" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="取消周期闹钟"
android:onClick="cancelAlarmCycle"
/>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_dact"
android:layout_width