From 48b79e040fa4d633d203dbcbd05eceddbedab636 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 1 Sep 2018 19:01:29 +0200 Subject: Added undo and redo buttons --- app/src/main/java/me/texx/Texx/PhotoEditorActivity.kt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/src/main/java/me') 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) -- cgit v1.2.3