当前位置:网站首页>How to add compose modify later
How to add compose modify later
2022-07-18 23:39:00 【Ango can't move】
We read the official design program demo Teach us all
@Composable
fun TopAppBar(modifier: Modifier = Modifier) {
Row(modifier =
modifier
.fillMaxWidth()
.height(appBarHeight + statusBarHeightDp)
.background(
Brush.linearGradient(
listOf(Blue700, Blue200)
))
horizontalArrangement = Arrangement.Center,
verticalAlignment = Alignment.CenterVertically
) {
content()
}
}Now if we want to add pading Then the color must not be rendered
We must first set the width and height 、 Set the color after . Finally, set the width and height . To become the inner margin
otherwise It becomes pading
How to operate
then
@Composable
fun TopAppBar(modifier: Modifier = Modifier) {
Row(modifier =
Modifier
.fillMaxWidth()
.height(appBarHeight + statusBarHeightDp)
.background(
Brush.linearGradient(
listOf(Blue700, Blue200)
))
.then(modifier),
horizontalArrangement = Arrangement.Center,
verticalAlignment = Alignment.CenterVertically
) {
content()
}
}This will be modifier Spliced to the back
It has achieved our effect
边栏推荐
- 从零复现PyTorch版(2)
- 验证两个字符串一致
- (pytorch advanced road III) conv2d
- Clean the disk with CMD command (mainly the system disk)
- [noip2006 popularity group] clear random number
- pytest接口自动化测试框架 | 接口测试概述
- ImportError: cannot import name ‘Imputer‘ from ‘sklearn. preprocessing‘
- Chapter IV instruction system
- STM32F1与STM32CubeIDE编程实例-W25Q-SPI-Flash与FatFs移植
- Expérience de l'arbre binaire
猜你喜欢

微信小程序_17,插槽

10.10:VectorDraw C# VS VectorDraw WEB/Crack-VectorDraw

Compose 轮播图

As a time series database, how does tdengine realize and open source its distributed clustering function?

6. JVM generational model -- garbage collection in the old age

Design of DHT11 temperature and humidity sensor based on stm32

Notes on scribbling questions in moher College -- SQL manual injection vulnerability test (mongodb database)

从零复现PyTorch版(2)

在代码中用YYYY-MM-DD要注意了!

There is no simpler and more practical single person pose estimation than this
随机推荐
深入了解arduino舵机控制库文件Servo.h
从0开始安装苹果cms及其资源采集和页面部分代码
Verify that the two strings are consistent
搭建夜莺集群监测系统
Introduction to sqlmap syntax
Yiwen teaches you how to design test cases
Leetcode sum of two numbers
20220715 domestic CONDA does not FQ the method of installing the latest version of pytoch
What are the efficient test methods for app regression testing?
Progress [detailed summary]
微信小程序_15,纯数据字段
Send papers! AI, machine learning, CV boss scientific research project enrollment!
Mysql的索引深度讲解
OSPF comprehensive experiment
What should I pay attention to when opening an account? Is it safe to open a stock account by mobile phone?
[development tutorial 1] open source Bluetooth heart rate waterproof sports Bracelet - Kit detection tutorial
从零复现PyTorch版(2)
Wanzi detailed C language document
Nosklattack tool installation and use problem solving
开户需要注意的是什么?请问手机开户股票开户安全吗?