-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed issue where the image moves to left or top
- Loading branch information
1 parent
fbc3394
commit d72652e
Showing
4 changed files
with
86 additions
and
7 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
nocropper/src/main/java/com/fenchtose/nocropper/BitmapResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.fenchtose.nocropper; | ||
|
||
import android.graphics.Bitmap; | ||
|
||
public class BitmapResult { | ||
|
||
private final Bitmap bitmap; | ||
private final State state; | ||
|
||
private BitmapResult(Bitmap bitmap, State state) { | ||
this.bitmap = bitmap; | ||
this.state = state; | ||
} | ||
|
||
public Bitmap getBitmap() { | ||
return bitmap; | ||
} | ||
|
||
public State getState() { | ||
return state; | ||
} | ||
|
||
static BitmapResult GestureFailure() { | ||
return new BitmapResult(null, State.FAILURE_GESTURE_IN_PROCESS); | ||
} | ||
|
||
static BitmapResult success(Bitmap bitmap) { | ||
return new BitmapResult(bitmap, State.SUCCESS); | ||
} | ||
|
||
public enum State { | ||
STARTED, | ||
SUCCESS, | ||
FAILURE_GESTURE_IN_PROCESS | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters