GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - krt-github/RefreshContainer: RefreshContainer

BranchesTags
Open more actions menu

Latest commit

 

History

19 Commits
19 Commits

Folders and files

NameName
Last commit message
Last commit date
app
app
 
 
gif
gif
 
 
refreshcontainerlib
refreshcontainerlib
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
gradle.properties
gradle.properties
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

RefreshContainer

RefreshContainer 是一个可以为任意 View 提供垂直方向上的刷新和加载更多能力的容器, 可自定义任意刷新风格(包括视图和交互逻辑)。

The RefreshContainer is An awesome widget provide refresh and load capabilities for any view, you can customize any style.

How it looks

  • Circle : https://github.com/tuesda/CircleRefreshLayout
  • Fly : https://github.com/race604/FlyRefresh

Features

  • Support refresh and load more
  • Support customize any interact style
  • Support customize refresh view and load more view
  • Support nested scroll
  • Work with any view

How to use

Add Gradle dependency:

dependencies {
    compile 'com.krt:refreshcontainerlib:1.0.3'
}

An example of basic usage in layout.xml:

<?xml version="1.0" encoding="utf-8"?>
<com.krt.refreshcontainerlib.RefreshContainer xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <Any view
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#FFF" /><!--Maybe you need cover your refresh view, e.g. parallax style-->

</com.krt.refreshcontainerlib.RefreshContainer>

Configure:

    mRefreshContainer = (RefreshContainer) findViewById(R.id.refresh_container);
    mRefreshContainer.setDuration(320)
//            .setRefreshChecker(IRefreshChecker) //If child view unsupported nested scroll, uncomment this line.
            .setRefreshLoadMoreCallback(new IRefreshLoadMoreCallback() {
                public void onRefresh() { do refresh }
                public void onLoadMore() { do load more }
            })
            .setRefreshView(IRefreshView)
            .setLoadMoreView(IRefreshView)
            .setRefreshStyle(IRefreshStyle)
            .execute(); //Very important!! Just execute configuration, not refresh

When work complete or be canceled:

mRefreshContainer.setWorkCompleted();

For more, please turn to the source code.

License

RefreshContainer is available under the Apache-2.0 license.

About

RefreshContainer

Topics

load-morepull-refreshrefresh

Resources

Readme
Apache-2.0 license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.