【发布时间】:2020-05-26 08:19:29
【问题描述】:
如果是这样的代码:
Text(
"Text with background",
Modifier.drawBackground(Color.Magenta, RectangleShape).padding(10.dp)
)
Text(
"Text with background",
Modifier.padding(10.dp).drawBackground(Color.Magenta, RectangleShape)
)
jetpack 编写配置
composeOptions {
kotlinCompilerVersion "1.3.70-dev-withExperimentalGoogleExtensions-20200424"
kotlinCompilerExtensionVersion = "0.1.0-dev10"
}
implementation 'androidx.ui:ui-framework:0.1.0-dev10'
implementation 'androidx.ui:ui-layout:0.1.0-dev10'
implementation 'androidx.ui:ui-material:0.1.0-dev10'
implementation 'androidx.ui:ui-tooling:0.1.0-dev10'
【问题讨论】:
-
你的两个代码sn-ps好像是一样的。
标签: android android-jetpack-compose