@@ -92,9 +92,9 @@ public CardStackView(Context context, AttributeSet attrs, int defStyle) {
92
92
setVisibleCount (array .getInt (R .styleable .CardStackView_visibleCount , option .visibleCount ));
93
93
setSwipeThreshold (array .getFloat (R .styleable .CardStackView_swipeThreshold , option .swipeThreshold ));
94
94
setStackFrom (StackFrom .values ()[array .getInt (R .styleable .CardStackView_stackFrom , option .stackFrom .ordinal ())]);
95
- setElevationEnabled (array .getBoolean (R .styleable .CardStackView_isElevationEnabled , option .isElevationEnabled ));
96
- setSwipeEnabled (array .getBoolean (R .styleable .CardStackView_isSwipeEnabled , option .isSwipeEnabled ));
97
- setEnableSwipeDirections (SwipeDirection .from (array .getInt (R .styleable .CardStackView_enableSwipeDirections , 0 )));
95
+ setElevationEnabled (array .getBoolean (R .styleable .CardStackView_elevationEnabled , option .isElevationEnabled ));
96
+ setSwipeEnabled (array .getBoolean (R .styleable .CardStackView_swipeEnabled , option .isSwipeEnabled ));
97
+ setSwipeDirection (SwipeDirection .from (array .getInt (R .styleable .CardStackView_swipeDirection , 0 )));
98
98
setLeftOverlay (array .getResourceId (R .styleable .CardStackView_leftOverlay , 0 ));
99
99
setRightOverlay (array .getResourceId (R .styleable .CardStackView_rightOverlay , 0 ));
100
100
array .recycle ();
@@ -279,7 +279,7 @@ private void moveToTop(CardContainerView container, View child) {
279
279
}
280
280
}
281
281
282
- private void reorderForDiscard () {
282
+ private void reorderForSwipe () {
283
283
moveToBottom (getTopView ());
284
284
containers .addLast (containers .removeFirst ());
285
285
}
@@ -298,7 +298,7 @@ private void executePreSwipeTask() {
298
298
}
299
299
300
300
private void executePostSwipeTask (Point point ) {
301
- reorderForDiscard ();
301
+ reorderForSwipe ();
302
302
303
303
state .lastPoint = point ;
304
304
@@ -370,22 +370,22 @@ public void setStackFrom(StackFrom stackFrom) {
370
370
}
371
371
}
372
372
373
- public void setElevationEnabled (boolean elevationEnabled ) {
374
- option .isElevationEnabled = elevationEnabled ;
373
+ public void setElevationEnabled (boolean isElevationEnabled ) {
374
+ option .isElevationEnabled = isElevationEnabled ;
375
375
if (adapter != null ) {
376
376
initialize (false );
377
377
}
378
378
}
379
379
380
- public void setSwipeEnabled (boolean swipeEnabled ) {
381
- option .isSwipeEnabled = swipeEnabled ;
380
+ public void setSwipeEnabled (boolean isSwipeEnabled ) {
381
+ option .isSwipeEnabled = isSwipeEnabled ;
382
382
if (adapter != null ) {
383
383
initialize (false );
384
384
}
385
385
}
386
386
387
- public void setEnableSwipeDirections (List <SwipeDirection > enableSwipeDirections ) {
388
- option .enableSwipeDirections = enableSwipeDirections ;
387
+ public void setSwipeDirection (List <SwipeDirection > swipeDirection ) {
388
+ option .swipeDirection = swipeDirection ;
389
389
if (adapter != null ) {
390
390
initialize (false );
391
391
}
0 commit comments