Compose (1/N) - 大纲

组合函数

组合函数 @Composable 预览效果 @preview
重组
非顺序执行
并行执行
附带效应
UI调用 setContent( )

微件

点击跳转

文本 Text
图片 Image
按钮 Button
装饰 Surface
分割线 Divider
间隔 Spacer
列表 LazyColumn、LazyRow

布局 Layout

标准布局

自定义布局

标准布局 纵向 Column
横向 Row
堆叠 Box
约束 ContrainstLayout 栅栏 Barrier
基准线 Guideline
链 Chain
约束集解耦 ContrainstSet
脚手架 Scaffold TopAppBar
BottomAppBar
FloatingActionBar
Drawer
自定义布局 单个子元素
多个子元素
固有特性测量 Intrinsics

状态 State

点击跳转

状态提升
状态的存储和恢复 MutableState
remember 
rememberSaveable
@Parcelize
MapSaver( )
ListSaver( )

隐式传参 CompositionLocal

点击跳转

隐式传参、显示传参
动态/静态创建、读取、局部修改

主题 Theme

点击跳转

Material Design 颜色 Color
排版 Typography
形状 Shape
复制并改写
自定义

动画

点击跳转

高级别动画 简单值动画 animate***AsState
可见性动画 AnimatedVisibility
内容改变动画 AnimatedContent
内容大小动画 Modifier.animateContentSize( )
淡入淡出动画 Crossfade
多值动画 updateTransiton
重复动画 rememberInfiniteTransition
低级别动画 Animatable
Animation
自定义动画 AnimationSpec
Easing
AnimationVector

手势

点击跳转

点击 可点击 Modifier.clickable( )
手势检测 Modifier.pointerInput( )
滚动 滚动修饰符 Modifier.verticalScroll( )、Modifier.horizontalScroll( )
可滚动修饰符 Modifier.scrollable( )
嵌套滚动 自动嵌套滚动
Modifier.nestedScroll( )
嵌套滚动互操作性(v1.2.0)
拖动 线性拖动 Modifier.draggable( )
平面拖动 Modifier.pointerInput( )
滑动 Modifier.swipeable( )
多点触控 Modifier.transformable( )

集成

导航

附带效应

猜你喜欢

转载自blog.csdn.net/HugMua/article/details/129995719
今日推荐