Skip to content

Commit

Permalink
Merge pull request #10 from censhengde/dev
Browse files Browse the repository at this point in the history
修复onStopDragging 回调KrcLineInfo 错误问题。
  • Loading branch information
censhengde authored Oct 13, 2023
2 parents a32f3e6 + f052884 commit 7f6a2c3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions krcview/src/main/java/com/bytedance/krcview/KrcView.java
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,6 @@ private void tryToShowLocatedView() {
}



private void tryToHideLocatedViewDelay() {
if (locatedView == null || locatedView.getVisibility() != VISIBLE) {
return;
Expand Down Expand Up @@ -861,7 +860,11 @@ private void notifyDragging() {
}
final KrcLineView cur = getLocatedItemView();
if (cur != null) {
onDraggingListener.onDragging(KrcView.this, locatedItemView != cur, cur.krcLineInfo,
final boolean positionChanged = locatedItemView != cur;
if (positionChanged) {
locatedItemView = cur;
}
onDraggingListener.onDragging(KrcView.this, positionChanged, cur.krcLineInfo,
cur.bindPosition);
}
}
Expand All @@ -883,6 +886,7 @@ private void updateLocateViewTopOffset() {
requestLayout();
}
}

public interface onDraggingListener {

/**
Expand Down

0 comments on commit 7f6a2c3

Please sign in to comment.