Skip to content

Commit e82d8bd

Browse files
committed
vault backup: 2024-12-26 22:14:38
1 parent 7627bcb commit e82d8bd

File tree

4 files changed

+35
-1
lines changed

4 files changed

+35
-1
lines changed

Diff for: Android.md

+30
Original file line numberDiff line numberDiff line change
@@ -1793,6 +1793,23 @@ public class MainActivity extends AppCompatActivity {
17931793
> `RecyclerView`是官方在5.0之后新添加的控件,推出用来替代传统的`ListView``GridView`列表控件。
17941794
> 相对于 `ListView``RecyclerView` 提供了更多的功能和更好的性能。它引入了一些新的概念,如 `ViewHolder` 模式,更高效的滚动和动画支持,以及更灵活的布局管理器(`LayoutManager`
17951795
1796+
1797+
*两者对比*
1798+
1799+
| **特性** | **ListView** | **RecyclerView** |
1800+
| ----------- | ----------------- | ------------------------------------- |
1801+
| **引入时间** | Android 1.x | Android 5.0+(API 21) |
1802+
| **视图复用机制** | `convertView`复用视图 | `ViewHolder`模式,复用更高效 |
1803+
| **布局管理** | 固定的垂直列表布局 | 通过`LayoutManager`灵活定义 |
1804+
| **动画效果** | 不支持 | 内置动画,支持自定义`ItemAnimator` |
1805+
| **高级功能支持** | 功能有限,需要大量手工实现 | 支持拖拽、滑动删除、多视图类型等 |
1806+
| **性能优化** | 适合简单的小型列表 | 性能更高,适合大规模数据列表 |
1807+
| **分隔线支持** | 内置分隔线功能 | 需要手动实现 |
1808+
| **头部/尾部视图** | 原生支持 | 需要通过`Adapter`实现 |
1809+
| **实现复杂度** | 简单易用 | 较复杂,需理解`ViewHolder``LayoutManager`机制 |
1810+
1811+
1812+
17961813
*待续*
17971814

17981815
### 其他控件
@@ -3673,6 +3690,19 @@ Activity通过`bindService()`绑定到`BindService`后,ServiceConnection类的
36733690

36743691
无序广播(标准广播)
36753692

3693+
**广播优先级**
3694+
3695+
范围为`-1000``1000`
3696+
3697+
- **值越大,优先级越高**,接收广播的顺序越靠前。
3698+
- 默认值为`0`
3699+
3700+
- 广播按优先级从高到低传递。
3701+
- 高优先级的接收器可以:
3702+
- **拦截广播**:通过调用`abortBroadcast()`方法,阻止广播继续传递。
3703+
- **修改广播内容**:通过`setResult()`修改广播的数据。
3704+
- 如果没有接收器拦截广播,广播会继续传递到优先级较低的接收器。
3705+
36763706
### 基础用法
36773707

36783708

Diff for: README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -130,5 +130,9 @@ git clone --recurse-submodules https://github.com/KomeijiReimu/Android.git
130130
**实验6.2(位置 + 文件存储)**(文档中传感器一栏)
131131

132132

133-
设计题要画流程图
133+
设计题要**统功能层次图(H 图)、软件部署架构图**
134134

135+
136+
![[Pasted image 20241226220840.png]]
137+
138+
![[Pasted image 20241226220848.png]]

Diff for: attachments/Pasted image 20241226220840.png

36.2 KB
Loading

Diff for: attachments/Pasted image 20241226220848.png

49 KB
Loading

0 commit comments

Comments
 (0)