Advertisement

安卓控件——定时广播

阅读量:

在安卓系统中,广播机制被广泛应用于多个场景之中。例如,当手机电量处于较低水平时,系统会主动发送一条广播信息,以此提醒用户并促使用户采取相应的应对措施。

1.项目布局:

7个按钮,两个文本框;

2.布局文件设计与实现

activity_main:

复制代码
    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
       xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity"
    android:outl

全部评论 (0)

还没有任何评论哟~