简体   繁体   English

Android Studio布局视图为空

[英]android studio layout view is empty

I create a new project for my android app. 我为我的Android应用程序创建了一个新项目。 But the layout view is all white and empty. 但是布局视图全是白色且为空。 This is the image 这是图像 1

but compare to what others have 但与其他人相比

2

It clearly sees that my layout window does not have a blue title on top, time and battery. 它清楚地看到我的布局窗口的顶部,时间和电池上没有蓝色标题。

This is a design view only so first run your application and check whether toolbar is there or not. 这只是一个设计视图,因此请首先运行您的应用程序并检查工具栏是否存在。

if its still not coming Go to style.xml and change your theme. 如果仍然无法访问,请转到style.xml并更改您的主题。

    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">

There are several themes, you can choose accordingly. 有几个主题,您可以选择相应的主题。

Check on Show Layout Decorations from your Activity Design tab. 从“ Activity设计”选项卡上选中“ Show Layout Decorations This will fix previews.. 这将修复预览。

Click on the eye icon visible upper side, it'll expand and just check on that item. 单击眼睛图标可见的上侧,它将展开并仅检查该项目。

在此处输入图片说明

the reason is you updated your android studio to 3.3 and I know there is the change that title bar will not visible in android design tab but if you run your app in the emulator or real device it will there 原因是您将android studio更新为3.3,并且我知道有一个更改,标题栏在android design选项卡中不可见,但是如果您在模拟器或真实设备中运行应用程序,它将在此处

you don't have to change the theme or anything run your app it will be there in your device 您无需更改主题或运行应用程序的任何内容,它将在您的设备中

I hope this will help you 我希望这能帮到您

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

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