Skip to content

Commit 1b82255

Browse files
committed
Update 1.1.3
1 parent bae1fc4 commit 1b82255

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

library/src/main/java/com/gigamole/slideimageview/lib/SlideImageView.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,21 +131,25 @@ private void createSource() {
131131
this.horizontalDirection = HorizontalDirection.LEFT_TO_RIGHT;
132132
this.verticalDirection = VerticalDirection.TOP_TO_BOTTOM;
133133

134+
if (this.rate > 0) {
135+
this.rate = this.rate * (-1);
136+
}
137+
134138
if (this.bitmap != null) {
135139
if (this.axis == Axis.HORIZONTAL) {
136140
this.bitmap = Bitmap.createScaledBitmap(
137141
this.bitmap,
138142
this.height * this.bitmap.getWidth() / this.bitmap.getHeight(),
139143
this.height,
140144
false);
141-
this.slideSize = (this.bitmap.getWidth() - this.width) * -1;
145+
this.slideSize = (this.bitmap.getWidth() - this.width) * (-1);
142146
} else {
143147
this.bitmap = Bitmap.createScaledBitmap(
144148
this.bitmap,
145149
this.width,
146150
this.width * this.bitmap.getHeight() / this.bitmap.getWidth(),
147151
false);
148-
this.slideSize = (this.bitmap.getHeight() - this.height) * -1;
152+
this.slideSize = (this.bitmap.getHeight() - this.height) * (-1);
149153
}
150154
} else {
151155
this.bitmap = Bitmap.createBitmap(this.width, this.height, Bitmap.Config.ARGB_8888);

0 commit comments

Comments
 (0)