和SmartRefresh一起用会不显示
Closed this issue · 4 comments
qiushui95 commented
` <com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id="@+id/srlMineWalletRecord"
style="@style/styleDefaultSmartRefresh"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.scwang.smartrefresh.header.MaterialHeader
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<androidx.recyclerview.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>`
wrap RecyclerView success的时候会不显示,我调试发现嵌套的那个FramLayout宽高都为0,
wrap SmartRefreshLayout可以正常显示,但我需要用SmartRefreshLayout的刷新功能,这个页面我只用Gloading做空页显示
ILoveYouCC commented
兄弟,有解决之道么~
qiushui95 commented
兄弟,有解决之道么~
1、把RecyclerView外面封装一层
2、布局不写RecyclerView,代码创建RecyclerView,然后wrap,然后设置SmartRefresh的ContentView为holder.wrapper
aLittleGreens commented
兄弟,有解决之道么~
1、把RecyclerView外面封装一层
2、布局不写RecyclerView,代码创建RecyclerView,然后wrap,然后设置SmartRefresh的ContentView为holder.wrapper
兄弟,请教下,为什么外面封装一层就ok了啊?
marren06 commented
怎么封装啊?