Skip to content

Commit

Permalink
Remove 'setDragState()' method
Browse files Browse the repository at this point in the history
  • Loading branch information
whilu committed Jan 19, 2016
1 parent 2130ed3 commit 19bbfe9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ private void init(Context context, AttributeSet attrs, int defStyleAttr){
mChildViews = new ArrayList<View>();
mViewDragHelper = ViewDragHelper.create(this, mSensitivity, new DragHelperCallBack());
setWillNotDraw(false);
setDragState();
setTagMaxLength(mTagMaxLength);
setTagHorizontalPadding(mTagHorizontalPadding);
setTagVerticalPadding(mTagVerticalPadding);
Expand Down Expand Up @@ -446,10 +445,6 @@ private int onGetCoordinateReferPos(int left, int top){
return pos;
}

private void setDragState(){
mTagViewState = mDragEnable ? ViewDragHelper.STATE_DRAGGING : ViewDragHelper.STATE_IDLE;
}

private void onChangeView(View view, int newPos, int originPos){
mChildViews.remove(originPos);
mChildViews.add(newPos, view);
Expand Down Expand Up @@ -617,7 +612,6 @@ public String getTagText(int position){
*/
public void setDragEnable(boolean enable){
this.mDragEnable = enable;
setDragState();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion sample/src/main/res/layout/content_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
android:layout_height="wrap_content"
android:layout_margin="0dp"
android:padding="10dp"
app:container_enable_drag="false"
app:container_enable_drag="true"
app:horizontal_interval="10dp"
app:tag_clickable="true"
app:tag_theme="pure_teal"
Expand Down

0 comments on commit 19bbfe9

Please sign in to comment.