预览未在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(应用程序> res>值)中,在基本应用程序主题中-在父样式之前添加"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屋!
查看全文