会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
小白龙白龙马
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
56
57
58
59
60
61
62
63
64
···
204
下一页
2022年7月31日
基础复习——activity的跳转-启动-结束——Activity的生命周期——Activity的启动模式(配置文件里面设置&代码里面设置)——重点
摘要: 从当前页面跳到新页面,跳转代码如下: startActivity(new Intent(源页面.this, 目标页面.class)); 不会引起歧义的话,也可或者简化为: startActivity(new Intent(this, 目标页面.class)); 从当前页面回到上一个页面,相当于关闭当
阅读全文
posted @ 2022-07-31 13:31 小白龙白龙马
阅读(99)
评论(0)
推荐(0)
2022年7月30日
基础复习——项目练习——计算器
摘要: 布局: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"
阅读全文
posted @ 2022-07-30 17:52 小白龙白龙马
阅读(44)
评论(0)
推荐(0)
基础复习——图像视图ImageView——图像按钮ImageButton——同时展示文本与图像
摘要: 图像视图展示的图片通常位于res/drawable***目录,设置图像视图的显示图片有两种方式: (1)在XML文件中,通过属性android:src设置图片资源,属性值格式形如“@drawable/不含扩展名的图片名称”。 (2)在Java代码中,调用setImageResource方法设置图片资
阅读全文
posted @ 2022-07-30 17:27 小白龙白龙马
阅读(392)
评论(0)
推荐(0)
基础复习——Button——按钮——触发事件——监听器(单独&公共)——点击事件与长按事件——禁用&恢复按钮
摘要: 按钮控件Button由TextView派生而来,它们之间的区别有: (1)Button拥有默认的按钮背景,而TextView默认无背景; (2)Button的内部文本默认居中对齐,而TextView的内部文本默认靠左对齐; (3)Button会默认将英文字母转为大写,而TextView保持原始的英文
阅读全文
posted @ 2022-07-30 15:54 小白龙白龙马
阅读(438)
评论(0)
推荐(0)
基础复习——TextView——文本显示——字体颜色——背景颜色——字体大小——@color/teal_200——@string/hello
摘要: 文本显示 布局: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_par
阅读全文
posted @ 2022-07-30 14:23 小白龙白龙马
阅读(60)
评论(0)
推荐(0)
基础复习——线性布局LinearLayout——相对布局RelativeLayout——网格布局GridLayout——滚动视图ScrollView
摘要: 线性布局LinearLayout 线性布局内部的各视图有两种排列方式: (1)orientation属性值为horizontal时,内部视图在水平方向从左往右排列。 (2)orientation属性值为vertical时,内部视图在垂直方向从上往下排列。 如果不指定orientation属性,则Li
阅读全文
posted @ 2022-07-30 13:49 小白龙白龙马
阅读(213)
评论(0)
推荐(0)
基础复习——文本显示——TextView——设置视图的宽高——设置视图之间的间距:layout_margin以及padding——设置视图的对其方式:layout_gravity以及gravity
摘要: 设置视图的宽高: 视图宽度通过属性android:layout_width表达,视图高度通过属性android:layout_height表达,宽高的取值主要有下列三种: (1)match_parent:表示与上级视图保持一致。(2)wrap_content:表示与内容自适应。(3)以dp为单位的具
阅读全文
posted @ 2022-07-30 12:31 小白龙白龙马
阅读(317)
评论(0)
推荐(0)
基础复习——新建activity页面——按钮监听事件——跳转到下个activity页面
摘要: 第一个页面添加一个按钮,设置按钮监听事件,并用于跳转到下个页面: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:
阅读全文
posted @ 2022-07-30 11:27 小白龙白龙马
阅读(65)
评论(0)
推荐(0)
2022年7月24日
多线程——异步服务IntentService
摘要: 布局: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"
阅读全文
posted @ 2022-07-24 18:42 小白龙白龙马
阅读(42)
评论(0)
推荐(0)
多线程——异步任务AsyncTask
摘要: 布局: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"
阅读全文
posted @ 2022-07-24 18:16 小白龙白龙马
阅读(70)
评论(0)
推荐(0)
上一页
1
···
56
57
58
59
60
61
62
63
64
···
204
下一页