• Stars
    star
    640
  • Rank 68,075 (Top 2 %)
  • Language
    Java
  • License
    MIT License
  • Created over 7 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Let's try to refresh your data with our library!

#FireworkyPullToRefresh Awesome Header image

Meet Fireworky Pull To Refresh for Android

It’s time to add some creativity to good old pull to refresh view. You can now literally launch your feed content or search results like a firework! Entertain your app users while they are waiting for refreshment — it’s easy with Fireworky Pull To Refresh library for Android apps.

Demo image #####Check out the animation on the Fireworky Pull To Refresh for Android on YouTube in HD quality.

What will you receive by using the Fireworky Pull To Refresh component in your app? The answer is pretty obvious: original and inspiring design element to generate well-disposed users. So, here you go!

Awesome

Setup and usage

Installation

by Gradle:

    compile 'com.cleveroad:fireworkypulltorefresh:1.0.3'

or just download zip and import module "fireworky-pull-to-refresh" to be able to modify the sources.

Supported Views

  • RecyclerView
  • ListView
  • ScrollView
  • NestedScrollView

How do I get set up?

Just wrap your view:

<com.cleveroad.pulltorefresh.firework.FireworkyPullToRefreshLayout
        android:id="@+id/pullToRefresh"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <android.support.v7.widget.RecyclerView
            android:id="@+id/recyclerView"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>

</com.cleveroad.ptr.FireworkyPullToRefreshLayout>

Configuration

Via XML

<com.cleveroad.pulltorefresh.firework.FireworkyPullToRefreshLayout
        xmlns:app="http://schemas.android.com/apk/res-auto"
        ...
        app:ptr_fireworkColors="@array/fireworkColors"
        app:ptr_background="@drawable/background"
        app:ptr_rocketAnimDuration="1000">
attribute name description
ptr_fireworkColors An array of colors which will be used for firework animation
ptr_background Background drawable
ptr_backgroundColor Background color
ptr_rocketAnimDuration Rocket flight duration
ptr_fireworkStyle Fireworks animation style - classic (by default) or modern

Via Java code

//use .config() methods:

mPullToRefresh.getConfig().setBackground(backgroundDrawable);
mPullToRefresh.getConfig().setBackground(backgroundBitmap);
mPullToRefresh.getConfig().setBackground(R.drawable.background);
mPullToRefresh.getConfig().setBackgroundColor(Color.BLACK);
mPullToRefresh.getConfig().setBackgroundColorFromResources(R.color.background);

mPullToRefresh.getConfig().setFireworkColors(colorsIntArray);
mPullToRefresh.getConfig().setFireworkColors(R.array.fireworkColors);

mPullRefreshView.getConfig().setFireworkStyle(Configuration.FireworkStyle.MODERN);

mPullToRefresh.getConfig().setRocketAnimDuration(1000L);

Animation

Refreshing callback

Just implement PullToRefreshView.OnRefreshListener:

mPullToRefresh.setOnRefreshListener(new PullToRefreshView.OnRefreshListener() {
    @Override
    public void onRefresh() {
        //refresh your data here        
    }
});

###To start or stop animation:###

mPullRefreshView.setRefreshing(isRefreshing);

Using custom views

For using custom views just implement FireworkyPullToRefreshLayout.OnChildScrollUpCallback:

mPullToRefresh.setOnChildScrollUpCallback(new FireworkyPullToRefreshLayout.OnChildScrollUpCallback() {
    @Override
    public boolean canChildScrollUp(@NonNull FireworkyPullToRefreshLayout parent, @Nullable View child) {
        //put your implementation here
    }
});

Support

If you have any questions regarding the use of this tutorial, please contact us for support at [email protected] (email subject: «FireworkyPullToRefresh for Android. Support request.»)
or
Use our contacts:
Cleveroad.com
Facebook account
Twitter account
Google+ account

License

    The MIT License (MIT)

    Copyright (c) 2015-2016 Cleveroad

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.

More Repositories

1

SlidingTutorial-Android

Android Library for making animated tutorials inside your app
Java
2,485
star
2

FanLayoutManager

Using Fan Layout Manager you can implement the horizontal list, the items of which move like fan blades
Java
2,057
star
3

AdaptiveTableLayout

Library that makes it possible to read, edit and write CSV files
Java
1,903
star
4

WaveInApp

Live Audio Equalizer with wave effect
Java
1,768
star
5

MusicBobber

Awesome Audio Widget for any Android Music App
Java
881
star
6

LoopBar

Tap Bar with infinite scrolling. Make the navigation menu right at fingerprints, in a tab bar.
Java
741
star
7

CRNetworkButton

Send Button for iOS
Swift
654
star
8

BubbleAnimationLayout

You don’t want your apps look and feel boring, do you? Add some bubbles!
Java
577
star
9

CycleMenu

Custom LayoutManager for the inner RecyclerView
Java
574
star
10

CRPageViewController

While a standard page view allows you to navigate between pages by using simple gestures, our component goes further
Objective-C
394
star
11

PlayWidget

Break the monotony and make your music player unique!
Java
367
star
12

Bitutorial

Crumbling tutorial for Android Apps
Java
357
star
13

CRParticleEffect

A CocoaPod that simplifies creation of the particle effects.
Objective-C
348
star
14

Android-Marshmallow-Boot-Animation

Java
244
star
15

DroidArt

Android library that allows perform manipulations with text and easily combine it with images.
Kotlin
209
star
16

BlurTutorial

Library for creating blur effects under Android UI elements
Kotlin
155
star
17

flutter_sliding_tutorial

User onboarding library with smooth animation of objects and background colors
Dart
128
star
18

CRRulerControl

Customizable component, created by Cleveroad iOS developers, is aimed at turning a simple ruler into a handy and smart instrument
Objective-C
112
star
19

ARFaceDetection

AR-based library for Android which is capable of detecting faces and overlaying images above the user’s head
Kotlin
51
star
20

slidingtutorial-ios

iOS Library for making animated tutorials inside your app
Objective-C
49
star
21

Bootstrap

This set of libraries is designed to help developers accomplish various tasks easier and faster
Kotlin
40
star
22

CRRollingLabel

Objective-C
30
star
23

CRCellCollectionView

With this component, pictures in your apps collection view will look like honeycomb instead of the boring standard variant
Objective-C
28
star
24

cr_calendar

Highly customizable, feature-packed calendar widget for Flutter.
Dart
27
star
25

ColorDetection

ColorDetection is an app built with OpenCV and using computer vision at its core. It’s able to detect and change colors of objects using a camera of iOS devices.
Objective-C++
21
star
26

cr_logger

Dart
13
star
27

cr_file_saver

Kotlin
3
star
28

CRRefreshControl

2
star
29

CRPlotView

1
star
30

CRPinCodeControl

1
star
31

cr_json_widget

Dart
1
star
32

cr_mentions

Dart
1
star