Coder Social home page Coder Social logo

itemtouchhelper-extension's People

Contributors

kukuhyoniatmoko avatar todou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

itemtouchhelper-extension's Issues

swipe direction

Hi,
TanX for your great library,
I have 2 question:
1-How can I swipe rows from the other direction?
2-How can I swipe rows from both directions?

Nested horizontal recyclerview

How to make swipe of item and recyclerview scrolling at the same time with this? If swiping is enabled, nested scroll is not working

建议保留向后兼容接口,放低minSdk

我看了一下主要是动画那部分用了高版本API,其实可以考虑吧执行动画那部分抽出来让客户端去实现。。。这一低版本就可以用noa来往下兼容

Bug with dx from onChildDraw

Steps to play

  1. swipe the first element
  2. very quickly swipe the second element
  3. try to slowly move the second element

Expectations:
the edge of the second element starts moving away from the buttons

Reality:
the edge of the second element begins to move from the edge of the screen

Example
device-2019-01-31-103632.zip

Swipe in both directions

First of all, thanks for the nice library! The code looks it only supports to open the swipe content view at the end of the item. Does it support to open the swiping content views at both ends of the item at the same time?

菜单点击事件无法正常响应

我照着源代码敲了一遍之后发现划开任意一个item的菜单,菜单中的按钮事件无法被响应,但是第二个item的菜单打后按钮事件可以被响应。后来发现奇数次打开的item菜单按钮事件不能被响应,但是偶数次的菜单按钮事件可以被响应。
甚至将源代码copy之后运行也有同样的情况。

关于callback中onChildDraw方法参数的建议

建议把Callback类中的onChildDraw方法的第三个参数由ViewHolder类型改为Extension类型,并为Extension新增两个接口,getItemView和getTranslateView。这样就可以为使用者提供一个默认的callback,省去使用者再自己定义callback并在onChildDraw进行类型判断的步骤。下面是我使用的示例:

public interface Extension {
    float getActionWidth();
    View getTranslateView();
    View getItemView();
}

自定义的callback中onChildDraw

@Override
public void onChildDraw(Canvas c, RecyclerView recyclerView, Extension extension, float dX, float dY, int actionState, boolean isCurrentlyActive) {
    extension.getTranslateView().setTranslationX(dX);
}

ItemTouchHelperExtension中调用onChildDraw的修改

private void onDraw(Canvas c, RecyclerView parent, ViewHolder selected,
                    List<RecoverAnimation> recoverAnimationList,
                    int actionState, float dX, float dY) {
    final int recoverAnimSize = recoverAnimationList.size();
    for (int i = 0; i < recoverAnimSize; i++) {
        final RecoverAnimation anim = recoverAnimationList.get(i);
        anim.update();
        final int count = c.save();
        onChildDraw(c, parent, (Extension) anim.mViewHolder, anim.mX, anim.mY, anim.mActionState,
                false);
        c.restoreToCount(count);
    }
    if (selected != null) {
        final int count = c.save();
        onChildDraw(c, parent, (Extension) selected, dX, dY, actionState, true);
        c.restoreToCount(count);
    }
}

How to fix after swipe position of items then why onclick called..?

I'm trying to use drag to swipe functionality in my activity with this code ,everything is work fine but one problem is there when im trying to swipe items from one position to another then after dropping the item on new position then immediately onclick function called how i can fix this...? very urgent

Drag of the first item

Create a list (recyclerView) with a number of items which don't fit on a screen (it's necessary to scroll to see all the items).
While drag the 1st item,scrolling works and the 1st item appears in the bottom under some other items.
It leads to the fact that the 1st item can't be placed, for instance, to the 2nd position.
While using Google ItemTouchHelper, no such problems arise.
first-item-drag-show

Swiped items don't returns to initial state

I have three views inside item layout - first is layout with remove button, second is item info layout, and the last one is progress bar, and in this case my swiped items don't returns to initial state.

When I moved progress to second layout, it started to work, but I want to have progress above this layout, not inside.

onSwiped method

I know there is a onSwiped method in the helper and callback classes however how can I use that method to access a view component in the activity? My use case consists of a main activity and a fragment. The adapter class shows the rows in the fragment through the activity class, now I need to change the text and an imageview when a row gets swiped, how can I access the textview and imageview present in the fragment through the onSwipe method?

Swiping the first item

There is an strange bug in swiping first item after swiping an other item. .
First swipe any arbitrary item, then before clicking on the delete or refresh buttons, try to swipe the first item. It will not swipe unless you start swiping from the rightest point of item. if you try to swipe the first item by touching the middle points of it, the previous open item will respond to this swipe.

点击事件触发有误

有时候打开Action然后再向右滑到原来位置,会触发click事件,而且有时候滑动会删除掉这个item,不知是不是触发到了SwipeThreshold,SwipeThreshold和ActionWidth有没有兼容好呢?

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.