Git Product home page Git Product logo

flyrefresh's Introduction

FlyRefresh

The Android implementation of Replace, designed by Zee Youn. I implement this as a FlyRefresh layout. The content of the layout can be any NestedScrollingChild, such as a RecyclerView, NestedScrollView, VerticalGridView, etc. This library can also work with NestedScrollingParent as parent, such as CoordinatorLayout.

How it looks

flyrefresh

Features

How to use

Add Gradle dependency:

dependencies {
   compile 'com.race604.flyrefresh:library:2.0.0'
}

An example of basic usage in layout.xml:

<com.race604.flyrefresh.FlyRefreshLayout
  android:id="@+id/fly_layout"
  android:layout_width="match_parent"
  android:layout_height="match_parent">

    <android.support.v7.widget.RecyclerView
      android:id="@+id/list"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:paddingTop="24dp"
      android:background="#FFFFFF"/>
</com.race604.flyrefresh.FlyRefreshLayout>

Or you can use PullHeaderLayout for more configurations, you can set custom attributes as shown below:

<declare-styleable name="PullHeaderLayout">
    <!-- hader size -->
    <attr name="phl_header_height" format="dimension" />
    <attr name="phl_header_expand_height" format="dimension" />
    <attr name="phl_header_shrink_height" format="dimension" />
    <!-- header view id -->
    <attr name="phl_header" format="reference" />
    <!-- content view id -->
    <attr name="phl_content" format="reference" />
    <!-- Float action button icon -->
    <attr name="phl_action" format="reference" />
</declare-styleable>

For more, please turn to the source code.

License

FlyRefresh is available under the MIT license.

flyrefresh's People

Contributors

race604 avatar victorvation avatar zer0w0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flyrefresh's Issues

Failed to resolve attribute at index 6

Caused by: java.lang.RuntimeException: Failed to resolve attribute at index 6
at android.content.res.TypedArray.getColorStateList(TypedArray.java:425)
at android.support.design.widget.FloatingActionButton.(FloatingActionButton.java:91)
at android.support.design.widget.FloatingActionButton.(FloatingActionButton.java:79)
at android.support.design.widget.FloatingActionButton.(FloatingActionButton.java:75)
at com.race604.flyrefresh.PullHeaderLayout.setActionDrawable(PullHeaderLayout.java:151)
at com.race604.flyrefresh.FlyRefreshLayout.onFinishInflate(FlyRefreshLayout.java:58)

Getting more done in GitHub with ZenHub

Hola! @flyerpan has created a ZenHub account for the race604 organization. ZenHub is the only project management tool integrated natively in GitHub – created specifically for fast-moving, software-driven teams.


How do I use ZenHub?

To get set up with ZenHub, all you have to do is download the browser extension and log in with your GitHub account. Once you do, you’ll get access to ZenHub’s complete feature-set immediately.

What can ZenHub do?

ZenHub adds a series of enhancements directly inside the GitHub UI:

  • Real-time, customizable task boards for GitHub issues;
  • Multi-Repository burndown charts, estimates, and velocity tracking based on GitHub Milestones;
  • Personal to-do lists and task prioritization;
  • Time-saving shortcuts – like a quick repo switcher, a “Move issue” button, and much more.

Add ZenHub to GitHub

Still curious? See more ZenHub features or read user reviews. This issue was written by your friendly ZenHub bot, posted by request from @flyerpan.

ZenHub Board

使用PullHeaderLayout之后,上推至最小高度时滑动异常,用的是api19的小米进行测试

非常感谢你提供的优秀的源码,经测试,发现了如题目所描述的小问题
public int move(float deltaY) {
float willTo;
float consumed = deltaY;
if (mScroll >= 0) {
willTo = mScroll + deltaY;
if (willTo < 0) {
...
}
} else if (willTo > mMaxHegiht) { //---------------->改成else if(willTo>mMaxScroll)解决了问题
consumed -= willTo - mMaxScroll;
willTo = mMaxScroll;
}
} else {
...
}
...
}

load more

Hello, can add the load more, if you can, will there be a conflict between the transaction

solution of actionButton covering the paper plane

95868369464712268
actionButton covered paper plane making it invisible.

following code solves this problem.
View actionButton = flyLayout.getHeaderActionButton();
((FloatingActionButton) actionButton).setCompatElevation(0);

gradle build will fail...

like this(I use JCenter By Gradle ):

xxx/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.0/res/values-v23/values-v23.xml
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
Error:Execution failed for task ':app:processDebugResources'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/xxx/Developer/IDE/Android/adt-bundle-mac/sdk/build-tools/21.1.2/aapt'' finished with non-zero exit value 1
Information:BUILD FAILED
Information:Total time: 1.197 secs
Information:3 errors
Information:0 warnings
Information:See complete output in console

solution to resolve "data.time" err

change data.time ---> data.date.getTime()

public void onBindViewHolder(ItemViewHolder itemViewHolder, int i) {
final ItemData data = mDataSet.get(i);
ShapeDrawable drawable = new ShapeDrawable(new OvalShape());
drawable.getPaint().setColor(data.color);
itemViewHolder.icon.setBackgroundDrawable(drawable);
itemViewHolder.icon.setImageResource(data.icon);
itemViewHolder.title.setText(data.title);
itemViewHolder.subTitle.setText(dateFormat.format(data.date.getTime()));
}

Gradle Code

hi dear. thanks you for this projects
it's awesome, but please insert Gradle code for use easily this project

tnx <3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.