Skip to content

Commit

Permalink
Default value of swipe should be 4 and not 2
Browse files Browse the repository at this point in the history
The default value 4 (circular) for the swipe direction is always overridden with the XML attributes. The default swipe direction should be 4 (circular) and not 2 (horizontal). Also see issue #6. Thanks for this library, it's really useful!
  • Loading branch information
Thomas-Vos authored Jul 2, 2017
1 parent 92ee00e commit 7e626f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions knoblibrary/src/main/java/it/beppi/knoblibrary/Knob.java
Original file line number Diff line number Diff line change
Expand Up @@ -421,13 +421,13 @@ void loadAttributes(AttributeSet attrs) {
typedArray.recycle();
}
int swipeAttrToInt(String s) {
if (s == null) return 2;
if (s == null) return 4;
if (s.equals("0")) return 0;
else if (s.equals("1")) return 1; // vertical
else if (s.equals("2")) return 2; // default - horizontal
else if (s.equals("2")) return 2; // horizontal
else if (s.equals("3")) return 3; // both
else if (s.equals("4")) return 4; // circular
else return 2;
else if (s.equals("4")) return 4; // default - circular
else return 4;
}
int balloonAnimationAttrToInt(String s) {
if (s == null) return 0;
Expand Down

0 comments on commit 7e626f1

Please sign in to comment.