简体   繁体   English

Jetpack Compose 手机屏幕布局预览

[英]Jetpack Compose Phone Screen Layout Preview

I'm new to Jetpack Compose.我是 Jetpack Compose 的新手。 I created an app and as a preview I get only the views, in my case a text view.我创建了一个应用程序,作为预览,我只获得视图,在我的例子中是文本视图。

How can I preview a screen and not an individual element?如何预览屏幕而不是单个元素? 在此处输入图像描述

I want something like that:我想要这样的东西:

在此处输入图像描述

I am using Android Studio 2020.3.1 Canary 8.我正在使用 Android Studio 2020.3.1 Canary 8。

Use the annotation @Preview(showSystemUi = true) .使用注释@Preview(showSystemUi = true)

More info about the preview annotations here .有关预览注释的更多信息在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM