All Projects → shuhart → HoveringCallback

shuhart / HoveringCallback

Licence: Apache-2.0 license
Drag & drop item decorator for RecyclerView with support for highlighting hovered items.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to HoveringCallback

SortedListAdapter
The RecyclerView.Adapter that makes your life easy!
Stars: ✭ 48 (+220%)
Mutual labels:  recyclerview, recyclerview-item-animation
Baserecyclerviewadapterhelper
BRVAH:Powerful and flexible RecyclerAdapter
Stars: ✭ 22,524 (+150060%)
Mutual labels:  recyclerview, recyclerview-item-animation
Searchable-RecyclerView-Demo
An example app using a SearchView to filter items in a RecyclerView while taking full advantage of item animations!
Stars: ✭ 722 (+4713.33%)
Mutual labels:  recyclerview, recyclerview-item-animation
AdapterCommands
Drop in solution to animate RecyclerView's dataset changes by using command pattern
Stars: ✭ 74 (+393.33%)
Mutual labels:  recyclerview, recyclerview-item-animation
Fastadapter
The bullet proof, fast and easy to use adapter library, which minimizes developing time to a fraction...
Stars: ✭ 3,512 (+23313.33%)
Mutual labels:  drag-and-drop, recyclerview
XamarinItemTouchHelper
Basic example of using ItemTouchHelper to add drag & drop and swipe-to-dismiss to RecyclerView for Xamarin
Stars: ✭ 35 (+133.33%)
Mutual labels:  recyclerview, itemtouchhelper
RecyclerViewItemTouchUsing
图文混排发帖(完美复现汽车之家论坛发帖)
Stars: ✭ 23 (+53.33%)
Mutual labels:  recyclerview, itemtouchhelper
SwipeAndDragRecyclerView
通过 ItemTouchHelper.Callback 实现 RecyclerView Item 的拖拽和侧滑删除
Stars: ✭ 39 (+160%)
Mutual labels:  recyclerview, recyclerview-item-animation
FancyAdapters
A collection of customizable RecyclerView Adapters for Android, that provide various functionality like item selection, contextual action mode controls, drag&drop and swiping, among other.
Stars: ✭ 49 (+226.67%)
Mutual labels:  drag-and-drop, recyclerview
recyclerview-list-drag-and-drop
No description or website provided.
Stars: ✭ 50 (+233.33%)
Mutual labels:  drag-and-drop, recyclerview
InfiniteScrollRecyclerView
Enables the RecyclerView to Auto scroll for indefinite time.
Stars: ✭ 49 (+226.67%)
Mutual labels:  recyclerview, recyclerview-item-animation
Android Advancedrecyclerview
RecyclerView extension library which provides advanced features. (ex. Google's Inbox app like swiping, Play Music app like drag and drop sorting)
Stars: ✭ 5,172 (+34380%)
Mutual labels:  drag-and-drop, recyclerview
recycler-adapter
RecyclerView-driven declarative UIs
Stars: ✭ 124 (+726.67%)
Mutual labels:  drag-and-drop, recyclerview
Dragdropswiperecyclerview
Kotlin Android library that extends RecyclerView to support gestures like drag & drop and swipe, among others. It works with vertical, horizontal and grid lists.
Stars: ✭ 469 (+3026.67%)
Mutual labels:  drag-and-drop, recyclerview
Dragdroptworecyclerviews
A code example demonstrating a dragging and dropping from one RecyclerView into another RecyclerView.
Stars: ✭ 181 (+1106.67%)
Mutual labels:  drag-and-drop, recyclerview
Vitrin
A simple app that shows categories, subcategories and items.
Stars: ✭ 70 (+366.67%)
Mutual labels:  recyclerview
DragDropiOS
DragDropiOS is a drag and drop manager on iOS. It supports drag and drop with in one or more classes extends UIView. This library contains UICollectionView and UITableView that implenment of drag and drop manager.
Stars: ✭ 71 (+373.33%)
Mutual labels:  drag-and-drop
XTableView
一个基于RecyclerView+Scroller实现的二维表格组件,同时支持侧滑菜单、拖动调整列表顺序等拓展功能。A two-dimensional table view, base on recyclerview, both support to side slide menu、drag item and more.
Stars: ✭ 15 (+0%)
Mutual labels:  recyclerview
FlutterBoardView
BoardView written for the flutter framework.
Stars: ✭ 82 (+446.67%)
Mutual labels:  drag-and-drop
easy-email
React.js Drag-and-Drop Email Editor based on MJML. Transform structured JSON data into major email clients compatible HTML. Written in Typescript and supported both in browser and Node.js.
Stars: ✭ 449 (+2893.33%)
Mutual labels:  drag-and-drop

HoveringCallback

Drag & drop item decorator for RecyclerView with support for highlighting hovered items.

Sample

Usage

  1. Add mavenCentral() to repositories block in your gradle file.
  2. Add implementation 'com.github.shuhart:hoveringcallback:1.3.0' to your dependencies.
  3. Look into the sample for additional details on how to use and configure the library.

Example:

HoverItemDecoration itemDecoration = new HoverItemDecoration(
        new HoveringCallback() {
            @Override
            public void attachToRecyclerView(@Nullable RecyclerView recyclerView) {
                super.attachToRecyclerView(recyclerView);
                addOnDropListener(new OnDroppedListener() {
                    @Override
                    public void onDroppedOn(RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {
                        Toast.makeText(
                                MainActivity.this,
                                "Dropped on position " + target.getAdapterPosition(),
                                Toast.LENGTH_SHORT).show();
                    }
                });
            }
        },
        new ItemBackgroundCallback() {
            private int hoverColor = Color.parseColor("#e9effb");

            @Override
            public int getDefaultBackgroundColor(@NonNull RecyclerView.ViewHolder viewHolder) {
                return Color.WHITE;
            }

            @Override
            public int getDraggingBackgroundColor(@NonNull RecyclerView.ViewHolder viewHolder) {
                return Color.WHITE;
            }

            @Override
            public int getHoverBackgroundColor(@NonNull RecyclerView.ViewHolder viewHolder) {
                return hoverColor;
            }
        });
itemDecoration.attachToRecyclerView(recyclerView);

License

Copyright 2018 Bogdan Kornev.

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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].