diff options
author | Marvin Borner | 2018-09-01 19:01:29 +0200 |
---|---|---|
committer | Marvin Borner | 2018-09-01 19:01:29 +0200 |
commit | 48b79e040fa4d633d203dbcbd05eceddbedab636 (patch) | |
tree | 1fc11b1115fe3ec12212dd48828eaa7a32e7fd3c /app/src/main/java/me | |
parent | 8ab9ed2a0ef2a73b7e61a68321f8e99475593483 (diff) |
Added undo and redo buttons
Diffstat (limited to 'app/src/main/java/me')
-rw-r--r-- | app/src/main/java/me/texx/Texx/PhotoEditorActivity.kt | 3 |
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) |