当前位置:网站首页>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 ")
}
}
}
})
}
}
}边栏推荐
- Grammaire anglaise Nom - Classification
- [Yu Yue education] theoretical mechanics reference materials of Shanghai Jiaotong University
- Win 11 major updates, new features love love.
- [combinatorics] generating function (positive integer splitting | unordered non repeated splitting example)
- 041. (2.10) talk about manpower outsourcing
- Real time split network (continuous update)
- 平淡的生活里除了有扎破皮肤的刺,还有那些原本让你魂牵梦绕的诗与远方
- Transformer T5 model read slowly
- Mysql45 lecture learning notes (II)
- Torch learning notes (6) -- logistic regression model (self training)
猜你喜欢

4. Load balancing and dynamic static separation
![[combinatorics] dislocation problem (recursive formula | general term formula | derivation process)*](/img/e8/67961bf8a589869bde2a0aa3e09605.jpg)
[combinatorics] dislocation problem (recursive formula | general term formula | derivation process)*

English語法_名詞 - 分類

Administrative division code acquisition

VLAN experiment

Kratos微服务框架下实现CQRS架构模式

CV in transformer learning notes (continuously updated)

How does GCN use large convolution instead of small convolution? (the explanation of the paper includes super detailed notes + Chinese English comparison + pictures)

Okaleido, a multimedia NFT aggregation platform, is about to go online, and a new NFT era may come

Torch learning notes (7) -- take lenet as an example for dataload operation (detailed explanation + reserve knowledge supplement)
随机推荐
Valentine's day, send you a little red flower~
shell 脚本中关于用户输入参数的处理
Suffix derivation based on query object fields
After the festival, a large number of people change careers. Is it still time to be 30? Listen to the experience of the past people
How about the Moco model?
Zhengda futures news: soaring oil prices may continue to push up global inflation
NFT新的契机,多媒体NFT聚合平台OKALEIDO即将上线
[combinatorics] generating function (use generating function to solve the number of solutions of indefinite equation)
Unity2018 to wechat games without pictures
2022-2028 global marking ink industry research and trend analysis report
Naoqi robot summary 27
php-fpm的max_chindren的一些误区
Boost.Asio Library
CTO and programmer were both sentenced for losing control of the crawler
Sepconv (separable revolution) code recurrence
SSH 远程执行命令简介
What does foo mean in programming?
2022-2028 global physiotherapy clinic industry research and trend analysis report
041. (2.10) talk about manpower outsourcing
JS_ Array_ sort