cachapa / ExpandableLayout

An expandable layout container for Android
Apache License 2.0
2.34k stars 274 forks source link

crashes when the ExpandableLayout contains LinearLayout or any ViewGroup #26

Closed iballan closed 7 years ago

iballan commented 7 years ago

I have this code in RecyclerView:

        <net.cachapa.expandablelayout.ExpandableLayout
            android:id="@+id/expandable_note"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            app:el_duration="200"
            app:el_expanded="false">

            <View
                android:layout_gravity="top"
                android:layout_width="match_parent"
                android:layout_height="10dp"
                android:background="@drawable/gradient_shadow"/>

            <EditText
                android:id="@+id/et_note"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/hint_note"
                android:padding="16dp"/>

        </net.cachapa.expandablelayout.ExpandableLayout>

The error message is this:

android.view.InflateException: Binary XML file line #204: Binary XML file line #204: Error inflating class <unknown>

I tried to wrap the views to LinearLayour, RelativeLayout and Framelayout inside the ExpandableLayout, however, i still get the same error

It works only when I put single view inside the ExpandableLayout