From 74612341f3855e32a642707db9b83c2dd1c17f9d Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 18 Dec 2019 10:13:47 +0100 Subject: [PATCH] do not use Text Design module at the editor, it takes up too much space --- app/build.gradle | 1 - .../gallery/pro/activities/NewEditActivity.kt | 13 +++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 91b6d6ef1..f79fa3a09 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -101,7 +101,6 @@ pesdkConfig { include 'ly.img.android.pesdk.ui.mobile_ui:filter' include 'ly.img.android.pesdk.ui.mobile_ui:transform' include 'ly.img.android.pesdk.ui.mobile_ui:adjustment' - include 'ly.img.android.pesdk.ui.mobile_ui:text-design' // Add asset packs if you need include 'ly.img.android.pesdk.assets:font-basic' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/NewEditActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/NewEditActivity.kt index 23dccbee2..e984c20b5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/NewEditActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/NewEditActivity.kt @@ -24,9 +24,14 @@ import ly.img.android.pesdk.backend.model.state.EditorSaveSettings import ly.img.android.pesdk.backend.model.state.manager.SettingsList import ly.img.android.pesdk.ui.activity.PhotoEditorBuilder import ly.img.android.pesdk.ui.model.state.UiConfigFilter +import ly.img.android.pesdk.ui.model.state.UiConfigMainMenu import ly.img.android.pesdk.ui.model.state.UiConfigText import ly.img.android.pesdk.ui.model.state.UiConfigTheme +import ly.img.android.pesdk.ui.panels.item.ToolItem import java.io.File +import java.util.* +import kotlin.collections.LinkedHashMap +import kotlin.collections.set class NewEditActivity : SimpleActivity() { private val PESDK_EDIT_IMAGE = 1 @@ -176,6 +181,14 @@ class NewEditActivity : SimpleActivity() { FontPackBasic.getFontPack() ) + // do not use Text Design, it takes up too much space + val tools = settingsList.getSettingsModel(UiConfigMainMenu::class.java).toolList + val newTools = tools.filterNot { + it.name!!.isEmpty() + }.toMutableList() as ArrayList + + settingsList.getSettingsModel(UiConfigMainMenu::class.java).setToolList(newTools) + settingsList.getSettingsModel(UiConfigTheme::class.java).theme = R.style.Imgly_Theme_NoFullscreen settingsList.getSettingsModel(EditorSaveSettings::class.java)