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

无法刷新或加载更多 #88

Closed
DCRain opened this issue Jul 25, 2017 · 9 comments
Closed

无法刷新或加载更多 #88

DCRain opened this issue Jul 25, 2017 · 9 comments

Comments

@DCRain
Copy link

DCRain commented Jul 25, 2017

SmartRefreshLayout中包含ListView,当ListView内容为空的时候,不能刷新也不能加载更多。
mListView.setNestedScrollingEnabled(false)也不能解决问题。代码如下:

    <com.scwang.smartrefresh.layout.SmartRefreshLayout xmlns:app="http://schemas.android.com/apk/res-auto"
        android:id="@+id/mRefreshView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:srlDisableContentWhenRefresh="true"
        app:srlEnableAutoLoadmore="false"
        app:srlEnableHeaderTranslationContent="false"
        app:srlEnableLoadmore="true">

        <ListView
            android:id="@+id/mListView"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

    </com.scwang.smartrefresh.layout.SmartRefreshLayout>
@scwang90
Copy link
Owner

你所描述的问题无法重现

@zhuozhao
Copy link

确实存在这个问题,当分页显示,有些手机屏幕长,第一页数据没显示全屏,导致加载更多不触发
`

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="40dp">

    <TextView
        android:id="@+id/startTv"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:background="@drawable/com_item_selector"
        android:clickable="true"
        android:drawableRight="@drawable/arrow_down_gray"
        android:gravity="center" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:background="@color/white"
        android:gravity="center"
        android:text="@string/zhi" />

    <TextView
        android:id="@+id/endTv"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:background="@drawable/com_item_selector"
        android:clickable="true"
        android:drawableRight="@drawable/arrow_down_gray"
        android:gravity="center" />

    <View
        android:layout_width="1px"
        android:layout_height="match_parent"
        android:layout_marginBottom="5dp"
        android:layout_marginTop="5dp"
        android:background="@color/gray" />

    <TextView
        android:id="@+id/companyTv"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:background="@drawable/com_item_selector"
        android:clickable="true"
        android:drawableRight="@drawable/arrow_down_gray"
        android:gravity="center" />

</LinearLayout>

<View
    android:layout_width="match_parent"
    android:layout_height="1px"
    android:background="@color/gray" />

<com.scwang.smartrefresh.layout.SmartRefreshLayout
    android:id="@+id/refreshLayout"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1"
    >

    <ListView
        android:id="@+id/listView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:nestedScrollingEnabled="false"/>

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

`
image

@scwang90
Copy link
Owner

@zhuozhao 看 常见问题 #71

@shijunxing0130
Copy link

解决了吗,我也遇到这问题

@zhuozhao
Copy link

image
https://github.com/scwang90/SmartRefreshLayout/blob/master/art/md_property.md
我在属性方法里找到了改配置,希望作者把改配置默认开启,thanks~

@shijunxing0130
Copy link

能下拉刷新吗

@quanqiuheike
Copy link

下拉刷新有时候调用了,有时候不调用

@scwang90
Copy link
Owner

@quanqiuheike 使用 1.0.4-alpha-0 版本

@quanqiuheike
Copy link

#下拉刷新有时候调用了,有时候不调用,有刷新的效果
之前使用的1.03-alpha-6的版本,平时测试的时候没有注意这个问题呢,抓包没有看到调用,重新debug就正常了,然后数据源为空的时候就没有调用,debug的时候都没有走到,结果今天发现了,然后跟现在的正式版本比对一下,后面改为稳定版本就可以了,感谢大神。

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

5 participants