随笔分类 -  工作需要———安卓app学习

摘要:布局: <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 小白龙白龙马 编辑
摘要:布局: <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 小白龙白龙马 编辑
摘要:布局: <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 小白龙白龙马 编辑
摘要:服务是在后台默默运行着的Android组件,它与生命周期有关的方法说明如下: onCreate:创建服务。 onStart:开始服务,Android 2.0以下版本使用,现已废弃。 onStartCommand:开始服务,Android 2.0及以上版本使用。 onDestroy:销毁服务。 onB 阅读全文
posted @ 2022-07-24 14:53 小白龙白龙马 编辑
摘要:布局: <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 小白龙白龙马 编辑
摘要:一个应用允许拥有多个通知渠道,每个渠道的重要性各不相同,从Android8开始必须指定通知渠道才能正常推送消息。 引入通知渠道之后,推送消息的过程分为下列几个步骤: (1)创建默认的通知渠道(2)使用通知渠道创建通知建造器(3)利用通知建造器设置消息参数,并生成通知对象(4)通过通知管理器推送消息 阅读全文
posted @ 2022-07-24 11:53 小白龙白龙马 编辑
摘要:手机通知栏存放的是App主动推给用户的提醒消息,每条消息包括消息图标、消息标题、消息内容等,这些消息元素由通知建造器Notification.Builder设定。 常用方法如下: setSmallIcon:设置应用名称左边的小图标。setLargeIcon:设置通知栏右边的大图标。setConten 阅读全文
posted @ 2022-07-24 11:13 小白龙白龙马 编辑
摘要:按下主页键会回到桌面,按下任务键会打开任务列表,这两个操作并未提供相应的按键处理方法,而是通过广播发出事件信息。 若想知晓是否回到桌面,以及是否打开任务列表,均需收听系统广播Intent.ACTION_CLOSE_SYSTEM_DIALOGS。 从收到的广播意图中获取原因reason字段,该字段值为 阅读全文
posted @ 2022-07-23 16:55 小白龙白龙马 编辑
摘要:布局: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" 阅读全文
posted @ 2022-07-23 16:15 小白龙白龙马 编辑
摘要:布局: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" 阅读全文
posted @ 2022-07-23 15:36 小白龙白龙马 编辑
摘要:布局: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" 阅读全文
posted @ 2022-07-23 15:01 小白龙白龙马 编辑
摘要:布局: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" 阅读全文
posted @ 2022-07-23 14:37 小白龙白龙马 编辑
摘要:布局: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" 阅读全文
posted @ 2022-07-23 14:13 小白龙白龙马 编辑
摘要:布局: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" 阅读全文
posted @ 2022-07-23 13:32 小白龙白龙马 编辑
摘要:布局: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" 阅读全文
posted @ 2022-07-17 16:50 小白龙白龙马 编辑
摘要:页面布局: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent 阅读全文
posted @ 2022-07-17 16:07 小白龙白龙马 编辑
摘要:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" andr 阅读全文
posted @ 2022-07-17 15:38 小白龙白龙马 编辑
摘要:布局: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" 阅读全文
posted @ 2022-07-17 14:09 小白龙白龙马 编辑
摘要:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" andr 阅读全文
posted @ 2022-07-17 13:22 小白龙白龙马 编辑
摘要:页面布局: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent 阅读全文
posted @ 2022-07-17 12:34 小白龙白龙马 编辑