Convert Figma logo to code with AI

recruit-lifestyle logoWaveSwipeRefreshLayout

No description available

1,924
380
1,924
22

Top Related Projects

🔥下拉刷新、上拉加载、二级刷新、淘宝二楼、RefreshLayout、OverScroll,Android智能下拉刷新框架,支持越界回弹、越界拖动,具有极强的扩展性,集成了几十种炫酷的Header和 Footer。

A wave-like loading drawable

4,015

Phoenix Pull-to-Refresh

Live Audio Equalizer with wave effect

Android loading animations

Quick Overview

WaveSwipeRefreshLayout is an Android library that provides a unique and visually appealing pull-to-refresh animation. It features a wave-like effect that responds to the user's touch, creating an engaging and interactive refresh experience for Android applications.

Pros

  • Visually appealing and unique refresh animation
  • Customizable wave color and height
  • Easy integration with existing Android projects
  • Smooth and responsive touch interactions

Cons

  • Limited to vertical scrolling views
  • May not fit all app designs or themes
  • Requires additional setup compared to standard SwipeRefreshLayout
  • Not actively maintained (last update was in 2017)

Code Examples

  1. Basic implementation:
WaveSwipeRefreshLayout mWaveSwipeRefreshLayout = findViewById(R.id.main_swipe);
mWaveSwipeRefreshLayout.setOnRefreshListener(new WaveSwipeRefreshLayout.OnRefreshListener() {
    @Override
    public void onRefresh() {
        // Perform refresh operation
        mWaveSwipeRefreshLayout.setRefreshing(false);
    }
});
  1. Customizing wave color:
mWaveSwipeRefreshLayout.setWaveColor(Color.parseColor("#ff0000")); // Set wave color to red
  1. Adjusting wave height:
mWaveSwipeRefreshLayout.setMaxDropHeight(1500); // Set maximum drop height in pixels

Getting Started

  1. Add the JitPack repository to your project's build.gradle:
allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}
  1. Add the dependency to your app's build.gradle:
dependencies {
    implementation 'com.github.recruit-lifestyle:WaveSwipeRefreshLayout:1.6'
}
  1. Add the WaveSwipeRefreshLayout to your layout XML:
<jp.co.recruit_lifestyle.android.widget.WaveSwipeRefreshLayout
    android:id="@+id/main_swipe"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <!-- Your scrollable content here -->

</jp.co.recruit_lifestyle.android.widget.WaveSwipeRefreshLayout>
  1. Initialize and use the WaveSwipeRefreshLayout in your activity or fragment as shown in the code examples above.

Competitor Comparisons

🔥下拉刷新、上拉加载、二级刷新、淘宝二楼、RefreshLayout、OverScroll,Android智能下拉刷新框架,支持越界回弹、越界拖动,具有极强的扩展性,集成了几十种炫酷的Header和 Footer。

Pros of SmartRefreshLayout

  • More comprehensive and feature-rich, offering a wide variety of refresh animations and styles
  • Better documentation and examples, making it easier for developers to implement and customize
  • Actively maintained with frequent updates and bug fixes

Cons of SmartRefreshLayout

  • Larger library size due to its extensive feature set, which may impact app size
  • Steeper learning curve for developers due to the numerous options and configurations available

Code Comparison

WaveSwipeRefreshLayout:

WaveSwipeRefreshLayout mWaveSwipeRefreshLayout = (WaveSwipeRefreshLayout) findViewById(R.id.main_swipe);
mWaveSwipeRefreshLayout.setOnRefreshListener(new WaveSwipeRefreshLayout.OnRefreshListener() {
    @Override public void onRefresh() {
        // Refresh action
    }
});

SmartRefreshLayout:

RefreshLayout refreshLayout = (RefreshLayout) findViewById(R.id.refreshLayout);
refreshLayout.setRefreshHeader(new ClassicsHeader(this));
refreshLayout.setOnRefreshListener(new OnRefreshListener() {
    @Override
    public void onRefresh(RefreshLayout refreshlayout) {
        // Refresh action
    }
});

Both libraries provide easy-to-use APIs for implementing pull-to-refresh functionality, but SmartRefreshLayout offers more customization options and a wider range of built-in header styles.

A wave-like loading drawable

Pros of WaveLoading

  • More customizable wave animation with adjustable properties like amplitude, speed, and color
  • Supports both determinate and indeterminate loading styles
  • Smaller codebase, potentially easier to integrate and maintain

Cons of WaveLoading

  • Limited to circular loading indicator, while WaveSwipeRefreshLayout offers a full-screen swipe refresh experience
  • Less actively maintained, with fewer recent updates and contributions
  • Lacks built-in support for pull-to-refresh functionality

Code Comparison

WaveLoading:

WaveLoadingView mWaveLoadingView = (WaveLoadingView) findViewById(R.id.waveLoadingView);
mWaveLoadingView.setShapeType(WaveLoadingView.ShapeType.CIRCLE);
mWaveLoadingView.setAmplitudeRatio(60);
mWaveLoadingView.setWaveColor(Color.parseColor("#ff64c2f4"));
mWaveLoadingView.setProgressValue(80);

WaveSwipeRefreshLayout:

WaveSwipeRefreshLayout mWaveSwipeRefreshLayout = (WaveSwipeRefreshLayout) findViewById(R.id.main_swipe);
mWaveSwipeRefreshLayout.setWaveColor(Color.WHITE);
mWaveSwipeRefreshLayout.setMaxDropHeight(1500);
mWaveSwipeRefreshLayout.setOnRefreshListener(new WaveSwipeRefreshLayout.OnRefreshListener() {
    @Override public void onRefresh() {
        // Refresh action
    }
});
4,015

Phoenix Pull-to-Refresh

Pros of Phoenix

  • More visually appealing and customizable animation
  • Smoother performance and fluid transitions
  • Better documentation and examples provided

Cons of Phoenix

  • Larger library size, potentially impacting app size
  • Steeper learning curve due to more complex implementation
  • Less frequent updates and maintenance

Code Comparison

WaveSwipeRefreshLayout:

mWaveSwipeRefreshLayout = (WaveSwipeRefreshLayout) findViewById(R.id.main_swipe);
mWaveSwipeRefreshLayout.setOnRefreshListener(new WaveSwipeRefreshLayout.OnRefreshListener() {
    @Override
    public void onRefresh() {
        // Your refresh logic here
    }
});

Phoenix:

PullToRefreshView mPullToRefreshView = (PullToRefreshView) findViewById(R.id.pull_to_refresh);
mPullToRefreshView.setOnRefreshListener(new PullToRefreshView.OnRefreshListener() {
    @Override
    public void onRefresh() {
        // Your refresh logic here
    }
});

Both libraries offer similar basic functionality for implementing pull-to-refresh in Android applications. Phoenix provides a more visually striking animation with its fire-like effect, while WaveSwipeRefreshLayout offers a simpler wave animation. Phoenix's implementation is slightly more complex but offers greater customization options. WaveSwipeRefreshLayout is lighter and easier to integrate but may lack some of the visual appeal of Phoenix.

Live Audio Equalizer with wave effect

Pros of WaveInApp

  • More customizable wave animation with adjustable parameters
  • Supports both horizontal and vertical wave orientations
  • Includes additional features like text and icon display within the wave

Cons of WaveInApp

  • Larger library size due to more features and customization options
  • Potentially more complex implementation for basic use cases
  • May have higher performance overhead for simple refresh scenarios

Code Comparison

WaveSwipeRefreshLayout:

mWaveSwipeRefreshLayout = (WaveSwipeRefreshLayout) findViewById(R.id.main_swipe);
mWaveSwipeRefreshLayout.setOnRefreshListener(new WaveSwipeRefreshLayout.OnRefreshListener() {
    @Override public void onRefresh() {
        // Refresh logic here
    }
});

WaveInApp:

WaveHelper mWaveHelper = new WaveHelper(waveView);
waveView.setShapeType(WaveView.ShapeType.CIRCLE);
waveView.setWaveColor(Color.parseColor("#80D8FF"));
waveView.setWaveShiftRatio(0.5f);
mWaveHelper.start();

The code comparison shows that WaveSwipeRefreshLayout is more focused on the pull-to-refresh functionality, while WaveInApp offers more customization options for wave appearance and behavior. WaveInApp requires more setup code for basic usage but provides greater flexibility in wave animation control.

Android loading animations

Pros of Android-SpinKit

  • Offers a wide variety of loading animations (8 different styles with multiple variations)
  • Easy to implement and customize with XML attributes
  • Lightweight and efficient, with minimal impact on app performance

Cons of Android-SpinKit

  • Limited to loading indicators, doesn't provide pull-to-refresh functionality
  • May require additional setup for integration with scrollable content
  • Less visually unique compared to WaveSwipeRefreshLayout's water-drop effect

Code Comparison

WaveSwipeRefreshLayout implementation:

<jp.co.recruit_lifestyle.android.widget.WaveSwipeRefreshLayout
    android:id="@+id/main_swipe"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <!-- Content goes here -->
</jp.co.recruit_lifestyle.android.widget.WaveSwipeRefreshLayout>

Android-SpinKit implementation:

<com.github.ybq.android.spinkit.SpinKitView
    android:id="@+id/spin_kit"
    style="@style/SpinKitView.Large.Circle"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:SpinKit_Color="@color/colorAccent" />

Both libraries offer easy-to-implement solutions for loading indicators, but serve different purposes. WaveSwipeRefreshLayout focuses on pull-to-refresh functionality with a unique water-drop animation, while Android-SpinKit provides a variety of loading spinner animations for general use throughout an app.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

WaveSwipeRefreshLayout

Android Arsenal ![Release](https://img.shields.io/github/release/recruit-lifestyle/WaveSwipeRefreshLayout.svg?label=maven version) License

This project aims to provide a reusable WaveSwipe to Refresh widget for Android.
Even if this works fine with API.13 or less, we support only for API.14 or more.

##Screenshots Watch YouTube video here.

Requirements

Target Sdk Version : 21
Min Sdk Version : 14

##How to use

  1. Add this to your build.gradle.
repositories {
    maven {
        url "https://jitpack.io"
    }
}

dependencies {
  compile 'com.github.recruit-lifestyle:WaveSwipeRefreshLayout:1.6'
}
  1. Add java jp.co.recruit_lifestyle.android.widget.WaveSwipeRefreshLayout , which has at least one AbsListView, to your layout XML file.
<jp.co.recruit_lifestyle.android.widget.WaveSwipeRefreshLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/main_swipe">

      <ListView
          android:id="@+id/main_list"
          android:layout_width="match_parent"
          android:layout_height="match_parent"/>

</jp.co.recruit_lifestyle.android.widget.WaveSwipeRefreshLayout>
  1. Add the function so that the your application knows when a user has completed a 'WaveSwipeRefresh'.
mWaveSwipeRefreshLayout = (WaveSwipeRefreshLayout) findViewById(R.id.main_swipe);
mWaveSwipeRefreshLayout.setOnRefreshListener(new WaveSwipeRefreshLayout.OnRefreshListener() {
  @Override public void onRefresh() {
    // Do work to refresh the list here.
    new Task().execute();
  }
});

private class Task extends AsyncTask<Void, Void, String[]> {
  ...
  @Override protected void onPostExecute(String[] result) {
    // Call setRefreshing(false) when the list has been refreshed.
    mWaveSwipeRefreshLayout.setRefreshing(false);
    super.onPostExecute(result);
  }
}

Credits

WaveSwipeRefresh is owned and maintained by RECRUIT LIFESTYLE CO., LTD.

WaveSwipeRefresh was originally created by
Yuki Mima
Jumpei Matsuda

##License

Copyright 2015 RECRUIT LIFESTYLE CO., LTD.

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.