From 85e105819ce02f37aed74f821555c5c4afebc0be Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 19 Jul 2018 21:15:54 +0200 Subject: [PATCH] add an Editor horizontal recyclerview that will hold the filter previews --- .../gallery/activities/EditActivity.kt | 8 ++++---- app/src/main/res/layout/activity_edit.xml | 12 ++++++++++-- .../res/layout/bottom_editor_actions_filter.xml | 15 +++++++++++++++ 3 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 app/src/main/res/layout/bottom_editor_actions_filter.xml diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt index d8e53214b..ccfb847a4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt @@ -234,11 +234,11 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener } currentPrimaryActionButton?.applyColorFilter(config.primaryColor) - if (currPrimaryAction == PRIMARY_ACTION_CROP_ROTATE) { - bottom_editor_edit_actions.beVisible() - } else { + bottom_editor_filter_actions.beVisibleIf(currPrimaryAction == PRIMARY_ACTION_FILTER) + bottom_editor_crop_rotate_actions.beVisibleIf(currPrimaryAction == PRIMARY_ACTION_CROP_ROTATE) + + if (currPrimaryAction != PRIMARY_ACTION_CROP_ROTATE) { bottom_aspect_ratios.beGone() - bottom_editor_edit_actions.beGone() currCropRotateAction = CROP_ROTATE_NONE } } diff --git a/app/src/main/res/layout/activity_edit.xml b/app/src/main/res/layout/activity_edit.xml index 50fc8e022..30c0eaa05 100644 --- a/app/src/main/res/layout/activity_edit.xml +++ b/app/src/main/res/layout/activity_edit.xml @@ -19,11 +19,19 @@ layout="@layout/bottom_actions_aspect_ratio" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_above="@+id/bottom_editor_edit_actions" + android:layout_above="@+id/bottom_editor_crop_rotate_actions" android:visibility="gone"/> + + + + + + +