摘要:
布局: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" 阅读全文
posted @ 2022-07-24 17:45
小白龙白龙马
阅读(40)
评论(0)
推荐(0)
摘要:
布局: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" 阅读全文
posted @ 2022-07-24 16:28
小白龙白龙马
阅读(46)
评论(0)
推荐(0)
摘要:
布局: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" 阅读全文
posted @ 2022-07-24 15:37
小白龙白龙马
阅读(178)
评论(0)
推荐(0)
摘要:
服务是在后台默默运行着的Android组件,它与生命周期有关的方法说明如下: onCreate:创建服务。 onStart:开始服务,Android 2.0以下版本使用,现已废弃。 onStartCommand:开始服务,Android 2.0及以上版本使用。 onDestroy:销毁服务。 onB 阅读全文
posted @ 2022-07-24 14:53
小白龙白龙马
阅读(179)
评论(0)
推荐(0)
摘要:
布局: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" 阅读全文
posted @ 2022-07-24 12:30
小白龙白龙马
阅读(587)
评论(0)
推荐(0)
摘要:
一个应用允许拥有多个通知渠道,每个渠道的重要性各不相同,从Android8开始必须指定通知渠道才能正常推送消息。 引入通知渠道之后,推送消息的过程分为下列几个步骤: (1)创建默认的通知渠道(2)使用通知渠道创建通知建造器(3)利用通知建造器设置消息参数,并生成通知对象(4)通过通知管理器推送消息 阅读全文
posted @ 2022-07-24 11:53
小白龙白龙马
阅读(979)
评论(0)
推荐(0)
摘要:
手机通知栏存放的是App主动推给用户的提醒消息,每条消息包括消息图标、消息标题、消息内容等,这些消息元素由通知建造器Notification.Builder设定。 常用方法如下: setSmallIcon:设置应用名称左边的小图标。setLargeIcon:设置通知栏右边的大图标。setConten 阅读全文
posted @ 2022-07-24 11:13
小白龙白龙马
阅读(582)
评论(0)
推荐(0)

浙公网安备 33010602011771号