Android studio 没有设备框架的Android Studio设备预览已消失

Android studio 没有设备框架的Android Studio设备预览已消失,android-studio,themes,Android Studio,Themes,我从GoogleCloudPlatform/appengine endpoints helloendpoints android项目获得了设计文件,并做了一些小改动。我把主题改成了黑色。我不知道这是怎么发生的,但我再也看不到设备控件或边框/边框了。如何重置它?其他设计文件显示正常 终于找到了原因。当我点击预览窗口的黑色外部区域时,一个工具栏出现在它的上方。左侧的第一个按钮称为“切换视口渲染模式”。这带回了我的设备视图。 Hhmm。。对我来说,无论何时使用父ScrollView布局设计布局,它都不

我从GoogleCloudPlatform/appengine endpoints helloendpoints android项目获得了设计文件,并做了一些小改动。我把主题改成了黑色。我不知道这是怎么发生的,但我再也看不到设备控件或边框/边框了。如何重置它?其他设计文件显示正常

终于找到了原因。当我点击预览窗口的黑色外部区域时,一个工具栏出现在它的上方。左侧的第一个按钮称为“切换视口渲染模式”。这带回了我的设备视图。

Hhmm。。对我来说,无论何时使用父ScrollView布局设计布局,它都不会显示工具栏和设备框架

要将Scrollview布局显示给其他布局,必须将其包括在内。例如:

My ScrollView.xml

<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical"
android:fadeScrollbars="true"> </ScrollView>

将其包含在活动\u main.xml或其他.xml文件中。

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".activities.ShareAppActivity">

<!--Include ActionBar/Toolbar-->
<android.support.v7.widget.Toolbar
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:id="@+id/toolbar"
    android:elevation="8dp"
    android:minHeight="?attr/actionBarSize"
    android:background="@color/colorPrimary">
</android.support.v7.widget.Toolbar>

    <include
        android:id="@+id/scrollview_layout"
        **layout="@layout/scrollview"**
        android:layout_height="match_parent"
        android:layout_width="match_parent"/> </RelativeLayout>

使用
-标记并在布局中=“@layout/YOUR\u XML\u SCROLLVIEW” 在xml布局中,您希望显示/包含您的滚动视图。
现在,您可以通过设备框架和工具栏查看scrollview\u布局。

单击预览窗口并按键盘上的“F”按钮