当前位置:网站首页>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 ")
}
}
}
})
}
}
}边栏推荐
- [combinatorics] generating function (positive integer splitting | basic model of positive integer splitting | disordered splitting with restrictions)
- Prototype inheritance..
- Introduction to SSH Remote execution command
- Valentine's day, send you a little red flower~
- Opencv learning notes (continuously updated)
- After nohup NPM start &, close the shell window directly, and the process closes accordingly
- Boost. Asio Library
- Sepconv (separable revolution) code recurrence
- SQL injection -day16
- Xception for deeplab v3+ (including super detailed code comments and original drawing of the paper)
猜你喜欢

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

Win 11 major updates, new features love love.

There are several levels of personal income tax

2022-2028 global aircraft head up display (HUD) industry research and trend analysis report

Gao Qing, Beijing University of Aeronautics and Astronautics: CIM is a natural quantum computing platform for graph data processing

English语法_形容词/副词3级 - 倍数表达
知其然,而知其所以然,JS 对象创建与继承【汇总梳理】

Pan for in-depth understanding of the attention mechanism in CV

How many convolution methods does deep learning have? (including drawings)

Analysis of the reasons why enterprises build their own software development teams to use software manpower outsourcing services at the same time
随机推荐
2022-2028 global aircraft head up display (HUD) industry research and trend analysis report
Coordinate layer conversion tool (video)
What kind of experience is it when the Institute earns 20000 yuan a month?
NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
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
How does GCN use large convolution instead of small convolution? (the explanation of the paper includes super detailed notes + Chinese English comparison + pictures)
[combinatorics] exponential generating function (properties of exponential generating function | exponential generating function solving multiple set arrangement)
[combinatorics] generating function (generating function application scenario | using generating function to solve recursive equation)
How to quickly view the inheritance methods of existing models in torchvision?
Torch learning notes (5) -- autograd
Getting started with JDBC
Why can deeplab v3+ be a God? (the explanation of the paper includes super detailed notes + Chinese English comparison + pictures)
SQL injection -day16
Web3 credential network project galaxy is better than nym?
Administrative division code acquisition
Gao Qing, Beijing University of Aeronautics and Astronautics: CIM is a natural quantum computing platform for graph data processing
Mature port AI ceaspectus leads the world in the application of AI in terminals, CIMC Feitong advanced products go global, smart terminals, intelligent ports, intelligent terminals
[Yu Yue education] theoretical mechanics reference materials of Shanghai Jiaotong University
This diversion
Summary and Reflection on the third week of winter vacation