My code stopped working from last night, was working earlier.

aniruguanirugu INMember ✭✭

This is my main.axml


<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:scrollbars="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />

and this is PhotoCardview.axml

<FrameLayout

android:layout_width="fill_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.CardView
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:padding="8dp">
        <ImageView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/imageView"
            android:scaleType="centerCrop" />
        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:textColor="#333333"
            android:text="Caption"
            android:id="@+id/textView"
            android:layout_gravity="center_horizontal"
            android:layout_marginLeft="4dp" />
    </LinearLayout>
</android.support.v7.widget.CardView>

This code I copied from the recycleview example from Xamarin website. I put my own binding and things was working great. Yesterday I put a splash.axml and now splash is my main launcher. and I open this page as intent

Intent intent = new Intent(this, typeof(MainActivity));
StartActivity(intent);

Now I see error popup in execution time

Android.Views.InflateException: Binary XML file line #1: Binary XML file line #1: Error inflating class android.support.v7.widget.CardView occurred

Someone please check and help

Best Answer

Answers

  • SreeeeSreeee INMember ✭✭✭✭✭
    edited December 2017

    Check whether you give NoHistory = true in Mainactivity. Provide NoHistory property only in Splash

Sign In or Register to comment.