预览未在 Android 3.0 Canary 中显示 [英] Preview not Showing in Android 3.0 Canary
本文介绍了预览未在 Android 3.0 Canary 中显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已开始使用最新的 Android Studio 3.0,但在预览时遇到问题.它没有在预览选项卡中显示预览.这是我所做的
I have started using Latest Android Studio 3.0 but I am having a problem with Preview. It's not showing Preview in Preview Tab. Here is what I have done
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<include
android:id="@+id/activePlanCard"
layout="@layout/layout_item_activated_plan" />
<TextView
android:id="@+id/DashView"
android:layout_width="match_parent"
android:layout_height="10dp"
android:layout_below="@id/activePlanCard"
android:background="@drawable/drw_dash_line" />
<TextView
android:id="@+id/provideAddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/DashView"
android:layout_margin="10dp"
android:text="Provide Address Detail :" />
</RelativeLayout>
</ScrollView>
</layout>
非常感谢您在这方面的帮助
Your assistance in this matter will be greatly appreciated
谢谢..
推荐答案
以下更改为我解决了这个问题:
The following change solved this for me:
在styles.xml (app > res > values) 中,在基础应用主题中 - 在父样式之前添加base".
In the styles.xml (app > res > values), in the base application theme - add "base" before the parent style.
来自:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
致:
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
这篇关于预览未在 Android 3.0 Canary 中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文