Skip to content

横向刷新,函数RefreshLayout.autoRefresh()会导致界面错位 #1035

Open
@zgnckzn

Description

@zgnckzn

详细描述
横向刷新内嵌套ViewPager,手动拖动刷新,布局无任何问题,调用函数RefreshLayout.autoRefresh()进行自动刷新时,会出现错位现象,刷新的时间越长,错位现象越明显

使用版本

    implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0-beta-1'
    implementation 'com.scwang.smartrefresh:SmartRefreshHeader:1.1.0-beta-1'
    implementation 'com.scwang.smartrefresh:SmartRefreshHorizontal:1.0.0-beta-1'

使用代码

refreshLayout.autoRefresh();

布局代码

    <com.scwang.smartrefresh.horizontal.SmartRefreshHorizontal
        android:id="@+id/refresh_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent" app:srlEnableOverScrollBounce="false">
        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
            <ImageView
                android:id="@+id/header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="@dimen/dp_10"
                android:layout_gravity="center"
                android:rotation="90"
                android:contentDescription="@string/app_name"
                android:src="@drawable/loading_rabbit"/>
        </FrameLayout>
        <android.support.v4.view.ViewPager
            android:id="@+id/view_pager"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
    </com.scwang.smartrefresh.horizontal.SmartRefreshHorizontal>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions