1. 程式人生 > >Android閃退:Most only support three sub view

Android閃退:Most only support three sub view

出現的原因是在於smartrefreshlayout巢狀的檢視層級超過三層,現在四層

    <com.scwang.smartrefresh.layout.SmartRefreshLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <com.scwang.smartrefresh.layout.header.ClassicsHeader
            android:layout_width="match_parent"
            android:layout_height="wrap_content"/>
        <com.youth.banner.Banner
            android:id="@+id/home_banner"
            android:layout_width="match_parent"
            android:layout_height="120dp" />
        <android.support.v7.widget.RecyclerView
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>

        <com.scwang.smartrefresh.layout.footer.ClassicsFooter
            android:layout_width="match_parent"
            android:layout_height="wrap_content"/>

    </com.scwang.smartrefresh.layout.SmartRefreshLayout>

我將banner註釋掉後就不會閃退.