huxq17 / XRefreshView

一个万能的android下拉上拉刷新的框架,完美支持recyclerview
1.7k stars 501 forks source link

XRefreshView作为FrameLayout子布局,不显示问题 #58

Closed 790770679 closed 7 years ago

790770679 commented 7 years ago

<FrameLayout android:id="@+id/hairpin_records_index_statelayout" android:layout_width="match_parent" android:layout_height="match_parent">

    <com.andview.refreshview.XRefreshView
        android:id="@+id/hairpin_records_xrv"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        xrefreshview:isHeightMatchParent="true"
        xrefreshview:isWidthMatchParent="true">

        <ListView

            android:id="@+id/hairpin_records_index_lv_record"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
    </com.andview.refreshview.XRefreshView>
</FrameLayout>

如上面的布局代码(FrameLayout本来是个加载状态的控件StateLayout,然后改成FrameLayout也出现同样问题),当设置FrameLayout为Gone,给列表数据,然后在设置FrameLayout为VISIABLE时,列表未出现。只有下拉一下才会出现列表。 麻烦看一下,谢谢。

huxq17 commented 7 years ago

你用Relativelayout试试。

huxq17 commented 7 years ago

3.6.1版本已经解决这个问题,你换下版本。