Phoenix


Source link: https://github.com/Yalantis/Phoenix

Phoenix Pull-to-Refresh

This project aims to provide a simple and customizable pull to refresh implementation. Made in [Yalantis] ( https://yalantis.com/?utm_source=github)

Check this [project on Dribbble] ( https://dribbble.com/shots/1650317-Pull-to-Refresh-Rentals)
Check this [project on Behance] ( https://www.behance.net/gallery/20411445/Mobile-Animations-Interactions)

#Usage

For a working implementation, Have a look at the Sample Project - sample

  1. Include the library as local library project.

    compile 'com.yalantis:phoenix:1.2.3'

  2. Include the PullToRefreshView widget in your layout.

    <com.yalantis.phoenix.PullToRefreshView
      android:id="@+id/pull_to_refresh"
      android:layout_width="match_parent"
      android:layout_height="match_parent">
    
    <ListView
    
    android:id="@+id/list_view"
    
    android:divider="@null"
    
    android:dividerHeight="0dp"
    
    android:layout_width="match_parent"
    
    android:layout_height="match_parent" />  </com.yalantis.phoenix.PullToRefreshView>
  3. In your onCreate method refer to the View and setup OnRefreshListener.

    mPullToRefreshView = (PullToRefreshView) findViewById(R.id.pull_to_refresh);
     mPullToRefreshView.setOnRefreshListener(new PullToRefreshView.OnRefreshListener() {
    
      @Override
      public void onRefresh() {
    
    mPullToRefreshView.postDelayed(new Runnable() {
    
     @Override
    
     public void run() {
    
      mPullToRefreshView.setRefreshing(false);
    
     
    }
    
    }
    , REFRESH_DELAY);
    
      
    }
      
    }
    );
    

#Customization

To customize drawables you can change:

  • sun.png - Sun image
  • sky.png - background image
  • buildings.png - foreground image

Misc

If you need to change progress state:

 mPullToRefreshView.setRefreshing(boolean isRefreshing)

#Compatibility

  • Android GINGERBREAD 2.3+

Changelog

Version: 1.2

  • Sample updated with RecyclerView example
  • Showing the refresh view just in it's bounds. (Issue with transparent / empty ListView)
  • Possibility to set refresh view padding

Version: 1.0

  • Initial Build

Let us know!

We’d be really happy if you sent us links to your projects where you use our component. Just send an email to [email protected] And do let us know if you have any questions or suggestion regarding the animation.

P.S. We’re going to publish more awesomeness wrapped in code and a tutorial on how to make UI for Android (iOS) better than better. Stay tuned!

License

Copyright 2017, Yalantis  Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License. You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 

Resources

Simple and flexible way to configuration RecyclerView using android data binding.

Stetho-Couchbase is a plugin for Stetho to enable visualizing and debugging Android Couchbase databases in Chrome.

Create super easy curve below image views and relative layouts.

This is a TabBar for Android,It is the Android navigation bar at the bottom of a cool, accord with the design specification of the Volkswagen APP

JGiven is a developer-friendly and pragmatic BDD tool for Java. Developers write scenarios in plain Java using a fluent, domain-specific API, JGiven generates reports that are readable by domain experts.

Android social login (facebook, google, etc) helper powered by RxJava.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes