当前位置:网站首页>Add control at the top of compose lazycolumn
Add control at the top of compose lazycolumn
2022-07-03 18:40:00 【Ango can't move】
LazyColumn(content = {
item { Text("Headers") }
// stickyHeader { Text("Headers") }
items(names) { name ->
Greeting(name)
}
})
The top will slide with it . If you want to stick and not slide have access to
stickyHeader
Very easy to use
The same can also be placed at the bottom
So we can also use this entry to write the empty state diagram
@OptIn(ExperimentalFoundationApi::class)
@Composable
fun Greetings(names: List<String> = List(0) { "$it" }) {
Surface(color = MaterialTheme.colors.surface) {
Column {
LazyColumn(content = {
if (names.isNotEmpty()) {
items(names) { name ->
Greeting(name)
}
} else {
item {
Column(
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center
) {
Text(" There's no data ")
}
}
}
})
}
}
}
边栏推荐
- 199. Right view of binary tree - breadth search
- Graduation summary
- [combinatorics] generating function (use generating function to solve the number of solutions of indefinite equation example 2 | extended to integer solution)
- 硬盘监控和分析工具:Smartctl
- 论文阅读 GloDyNE Global Topology Preserving Dynamic Network Embedding
- How to read the source code [debug and observe the source code]
- Okaleido, a multimedia NFT aggregation platform, is about to go online, and a new NFT era may come
- Nodejs (01) - introductory tutorial
- Kratos微服务框架下实现CQRS架构模式
- 22.2.14 -- station B login with code -for circular list form - 'no attribute' - 'needs to be in path selenium screenshot deviation -crop clipping error -bytesio(), etc
猜你喜欢
Getting started with JDBC
Torch learning notes (3) -- univariate linear regression model (self training)
Analysis of the reasons why enterprises build their own software development teams to use software manpower outsourcing services at the same time
组策略中开机脚本与登录脚本所使用的用户身份
Redis cache avalanche, penetration, breakdown
Raft 日志复制
What London Silver Trading software supports multiple languages
Prototype inheritance..
NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
Computer graduation project PHP library book borrowing management system
随机推荐
Naoqi robot summary 27
An academic paper sharing and approval system based on PHP for computer graduation design
Raft 日志复制
NFT新的契机,多媒体NFT聚合平台OKALEIDO即将上线
Transformer T5 model read slowly
Unity webgl optimization
平淡的生活里除了有扎破皮肤的刺,还有那些原本让你魂牵梦绕的诗与远方
Caddy server agent
198. Looting - Dynamic Planning
Torch learning notes (1) -- 19 common ways to create tensor
[combinatorics] generating function (use generating function to solve the number of solutions of indefinite equation example 2 | extended to integer solution)
Why can deeplab v3+ be a God? (the explanation of the paper includes super detailed notes + Chinese English comparison + pictures)
Grammaire anglaise Nom - Classification
Opencv learning notes (continuously updated)
2022-2028 global scar care product industry research and trend analysis report
How about the Moco model?
English语法_形容词/副词3级 - 倍数表达
How to read the source code [debug and observe the source code]
22.2.14 -- station B login with code -for circular list form - 'no attribute' - 'needs to be in path selenium screenshot deviation -crop clipping error -bytesio(), etc
[Yu Yue education] world reference materials of Microbiology in Shanghai Jiaotong University