Giter Club home page Giter Club logo

msay2 / circulardeletionswipe Goto Github PK

View Code? Open in Web Editor NEW
30.0 2.0 7.0 1.33 MB

This project implements one of the most beautiful animations of the class RecyclerView, the class ItemTouchHelper. The ItemTouchHelper class implements the dragging of each object on the RecyclerView class by revealing a view under the first sliding view. Please, refer to this link to learn more about the class ItemTouchHelper. This project shows you not only how to implement this animation but also to add a circular animation that will coordinate with the sliding of your finger.

License: Apache License 2.0

Java 100.00%
swipe-to-delete recyclerview-item-animation animation java android project circularreveal

circulardeletionswipe's Introduction

CircularDeletionSwipe

Description

This project implements one of the most beautiful animations of the class RecyclerView, the class ItemTouchHelper.

The ItemTouchHelper class implements the dragging of each object on the RecyclerView class by revealing a view under the first sliding view.

Please, refer to this link to learn more about the class ItemTouchHelper.

This project shows you not only how to implement this animation but also to add a circular animation that will coordinate with the sliding of your finger.

Use

First

Copy the DeletionSwipeHelper java file to your project

Secondly

Implemented the interface of the DeletionSwipeHelper class to include a sliding listener

public class MainActivity extends AppCompatActivity implements DeletionSwipeHelper.OnSwipeListener

Then implement the onSwiped abstract methods

Thirdly

Note this import import android.support.v7.widget.helper.ItemTouchHelper;

Fourth

Note these lines of programming in the onCreate method to initiate the DeletionSwipeHelper class

ItemTouchHelper.Callback callback = new DeletionSwipeHelper(0, ItemTouchHelper.START, this, this);
ItemTouchHelper itemTouchHelper = new ItemTouchHelper(callback);
itemTouchHelper.attachToRecyclerView(recycler);

Example of use

GLITCH-inc

Clone Git Repository

Please refresh build

License

Copyright 2017 MSay2

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.

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.