Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Preview not Showing in Android 3.0 Canary

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

Thanks..

Here I've attached preview ScreenShort

like image 252
Naresh Avatar asked Jun 13 '17 04:06

Naresh


1 Answers

The following change solved this for me:

In the styles.xml (app > res > values), in the base application theme - add "base" before the parent style.

From:

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

To:

<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
like image 127
Anette Kleffelgaard Avatar answered Oct 24 '22 00:10

Anette Kleffelgaard