aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java/me/texx
diff options
context:
space:
mode:
authorMarvin Borner2018-09-01 19:01:29 +0200
committerMarvin Borner2018-09-01 19:01:29 +0200
commit48b79e040fa4d633d203dbcbd05eceddbedab636 (patch)
tree1fc11b1115fe3ec12212dd48828eaa7a32e7fd3c /app/src/main/java/me/texx
parent8ab9ed2a0ef2a73b7e61a68321f8e99475593483 (diff)
Added undo and redo buttons
Diffstat (limited to 'app/src/main/java/me/texx')
-rw-r--r--app/src/main/java/me/texx/Texx/PhotoEditorActivity.kt3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/src/main/java/me/texx/Texx/PhotoEditorActivity.kt b/app/src/main/java/me/texx/Texx/PhotoEditorActivity.kt
index 38031ad..7fff34a 100644
--- a/app/src/main/java/me/texx/Texx/PhotoEditorActivity.kt
+++ b/app/src/main/java/me/texx/Texx/PhotoEditorActivity.kt
@@ -49,6 +49,9 @@ class PhotoEditorActivity : AppCompatActivity() {
private fun setButtonListeners(photoEditor: PhotoEditor) {
var currentlyDrawing = false
+ undoButton.setOnClickListener { photoEditor.undo() }
+ redoButton.setOnClickListener { photoEditor.redo() }
+
photoDrawButton.setOnClickListener {
currentlyDrawing = !currentlyDrawing
photoEditor.setBrushDrawingMode(currentlyDrawing)