Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

加到布局里初始化时报错 android.view.InflateException: Binary XML file line #44: mContentView is null #15

Open
yyy000112 opened this issue Jan 1, 2017 · 5 comments

Comments

@yyy000112
Copy link

android.view.InflateException: Binary XML file line #44: mContentView is null

我的布局如下

<com.canyinghao.canrefresh.CanRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/canfresh"
android:layout_width="match_parent"
android:layout_height="match_parent">

<RelativeLayout
    android:background="#fff"
    android:layout_width="match_parent"
    android:layout_height="40dp">

    <ImageView
        android:id="@+id/iv_search_brand"
        android:src="@drawable/search_large"
        android:layout_marginLeft="10dp"
        android:layout_centerVertical="true"
        android:layout_width="25dp"
        android:layout_height="25dp" />

    <TextView
        android:layout_centerVertical="true"
        android:layout_centerInParent="true"
        android:text="品牌"
        android:textSize="16sp"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

</RelativeLayout>



<android.ye.fashioncircle.view.verticalViewPager.VerticalViewPager
    android:id="@+id/vertical_viewpager"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
</android.ye.fashioncircle.view.verticalViewPager.VerticalViewPager>
@canyinghao
Copy link
Owner

你用法错了,参考示例,id必须为can_content_view、can_refresh_header等

@yyy000112
Copy link
Author

更改后点击相应页面无法响应了
Error reporting crash android.os.TransactionTooLargeException: data parcel size 11802176 bytes

@canyinghao
Copy link
Owner

你参考demo吧,先用listview之类的试,没问题了,再换成你要写的布局。

@yyy000112
Copy link
Author

哎,用不了,添加依赖后,跟我其他的都起冲突了,提示Fragment null must be a public static class to be properly recreated from in

@canyinghao
Copy link
Owner

这,我也不清是怎么回事,抱歉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants