updating the photo/video editor, add new modules

This commit is contained in:
tibbi 2020-12-04 11:19:34 +01:00
parent 1f9e1bbdd3
commit a8bf381565
4 changed files with 40 additions and 28 deletions

2
.gitignore vendored
View File

@ -8,3 +8,5 @@
/captures /captures
keystore.jks keystore.jks
keystore.properties keystore.properties
/app/src/proprietary/assets/pesdk_license
/app/src/proprietary/assets/vesdk_license

View File

@ -123,13 +123,21 @@ if (is_proprietary) {
include 'ui:focus' include 'ui:focus'
include 'ui:brush' include 'ui:brush'
include 'ui:filter' include 'ui:filter'
include 'ui:sticker'
include 'ui:overlay'
include 'ui:transform' include 'ui:transform'
include 'ui:adjustment' include 'ui:adjustment'
include 'backend:serializer' include 'backend:serializer'
include 'backend:sticker-smart'
include 'backend:sticker-animated'
include 'assets:font-basic' include 'assets:font-basic'
include 'assets:filter-basic' include 'assets:filter-basic'
include 'assets:overlay-basic'
include 'assets:sticker-shapes'
include 'assets:sticker-emoticons'
include 'assets:sticker-animated'
} }
} }
} }

View File

@ -22,6 +22,10 @@ import com.simplemobiletools.gallery.pro.extensions.tryDeleteFileDirItem
import ly.img.android.pesdk.PhotoEditorSettingsList import ly.img.android.pesdk.PhotoEditorSettingsList
import ly.img.android.pesdk.assets.filter.basic.FilterPackBasic import ly.img.android.pesdk.assets.filter.basic.FilterPackBasic
import ly.img.android.pesdk.assets.font.basic.FontPackBasic import ly.img.android.pesdk.assets.font.basic.FontPackBasic
import ly.img.android.pesdk.assets.overlay.basic.OverlayPackBasic
import ly.img.android.pesdk.assets.sticker.animated.StickerPackAnimated
import ly.img.android.pesdk.assets.sticker.emoticons.StickerPackEmoticons
import ly.img.android.pesdk.assets.sticker.shapes.StickerPackShapes
import ly.img.android.pesdk.backend.model.config.CropAspectAsset import ly.img.android.pesdk.backend.model.config.CropAspectAsset
import ly.img.android.pesdk.backend.model.constant.ImageExportFormat import ly.img.android.pesdk.backend.model.constant.ImageExportFormat
import ly.img.android.pesdk.backend.model.constant.OutputMode import ly.img.android.pesdk.backend.model.constant.OutputMode
@ -32,8 +36,8 @@ import ly.img.android.pesdk.backend.model.state.manager.SettingsList
import ly.img.android.pesdk.ui.activity.PhotoEditorBuilder import ly.img.android.pesdk.ui.activity.PhotoEditorBuilder
import ly.img.android.pesdk.ui.model.state.* import ly.img.android.pesdk.ui.model.state.*
import ly.img.android.pesdk.ui.panels.item.CropAspectItem import ly.img.android.pesdk.ui.panels.item.CropAspectItem
import ly.img.android.pesdk.ui.panels.item.PersonalStickerAddItem
import ly.img.android.pesdk.ui.panels.item.ToggleAspectItem import ly.img.android.pesdk.ui.panels.item.ToggleAspectItem
import ly.img.android.pesdk.ui.panels.item.ToolItem
import java.io.File import java.io.File
import java.io.InputStream import java.io.InputStream
import java.io.OutputStream import java.io.OutputStream
@ -269,21 +273,18 @@ class NewPhotoEditActivity : SimpleActivity() {
brushSize = applicationContext.config.editorBrushSize brushSize = applicationContext.config.editorBrushSize
} }
// do not use Text Design, it takes up too much space configure<UiConfigOverlay> {
val tools = getSettingsModel(UiConfigMainMenu::class.java).toolList it.setOverlayList(OverlayPackBasic.getOverlayPack())
val newTools = tools.filterNot {
it.name!!.isEmpty()
}.toMutableList() as ArrayList<ToolItem>
// move Focus at the end, as it is the least used
// on some devices it is not obvious that the toolbar can be scrolled horizontally, so move the best ones at the beginning to make them visible
val focus = newTools.firstOrNull { it.name == getString(R.string.pesdk_focus_title_name) }
if (focus != null) {
newTools.remove(focus)
newTools.add(focus)
} }
getSettingsModel(UiConfigMainMenu::class.java).setToolList(newTools) configure<UiConfigSticker> {
it.setStickerLists(
PersonalStickerAddItem(),
StickerPackEmoticons.getStickerCategory(),
StickerPackShapes.getStickerCategory(),
StickerPackAnimated.getStickerCategory()
)
}
getSettingsModel(UiConfigTheme::class.java).theme = R.style.Imgly_Theme_NoFullscreen getSettingsModel(UiConfigTheme::class.java).theme = R.style.Imgly_Theme_NoFullscreen

View File

@ -22,6 +22,10 @@ import com.simplemobiletools.gallery.pro.extensions.tryDeleteFileDirItem
import ly.img.android.pesdk.VideoEditorSettingsList import ly.img.android.pesdk.VideoEditorSettingsList
import ly.img.android.pesdk.assets.filter.basic.FilterPackBasic import ly.img.android.pesdk.assets.filter.basic.FilterPackBasic
import ly.img.android.pesdk.assets.font.basic.FontPackBasic import ly.img.android.pesdk.assets.font.basic.FontPackBasic
import ly.img.android.pesdk.assets.overlay.basic.OverlayPackBasic
import ly.img.android.pesdk.assets.sticker.animated.StickerPackAnimated
import ly.img.android.pesdk.assets.sticker.emoticons.StickerPackEmoticons
import ly.img.android.pesdk.assets.sticker.shapes.StickerPackShapes
import ly.img.android.pesdk.backend.model.config.CropAspectAsset import ly.img.android.pesdk.backend.model.config.CropAspectAsset
import ly.img.android.pesdk.backend.model.constant.OutputMode import ly.img.android.pesdk.backend.model.constant.OutputMode
import ly.img.android.pesdk.backend.model.state.BrushSettings import ly.img.android.pesdk.backend.model.state.BrushSettings
@ -31,8 +35,8 @@ import ly.img.android.pesdk.backend.model.state.manager.SettingsList
import ly.img.android.pesdk.ui.activity.VideoEditorBuilder import ly.img.android.pesdk.ui.activity.VideoEditorBuilder
import ly.img.android.pesdk.ui.model.state.* import ly.img.android.pesdk.ui.model.state.*
import ly.img.android.pesdk.ui.panels.item.CropAspectItem import ly.img.android.pesdk.ui.panels.item.CropAspectItem
import ly.img.android.pesdk.ui.panels.item.PersonalStickerAddItem
import ly.img.android.pesdk.ui.panels.item.ToggleAspectItem import ly.img.android.pesdk.ui.panels.item.ToggleAspectItem
import ly.img.android.pesdk.ui.panels.item.ToolItem
import java.io.File import java.io.File
import java.io.InputStream import java.io.InputStream
import java.io.OutputStream import java.io.OutputStream
@ -268,21 +272,18 @@ class NewVideoEditActivity : SimpleActivity() {
brushSize = applicationContext.config.editorBrushSize brushSize = applicationContext.config.editorBrushSize
} }
// do not use Text Design, it takes up too much space configure<UiConfigOverlay> {
val tools = getSettingsModel(UiConfigMainMenu::class.java).toolList it.setOverlayList(OverlayPackBasic.getOverlayPack())
val newTools = tools.filterNot {
it.name!!.isEmpty()
}.toMutableList() as ArrayList<ToolItem>
// move Focus at the end, as it is the least used
// on some devices it is not obvious that the toolbar can be scrolled horizontally, so move the best ones at the beginning to make them visible
val focus = newTools.firstOrNull { it.name == getString(R.string.pesdk_focus_title_name) }
if (focus != null) {
newTools.remove(focus)
newTools.add(focus)
} }
getSettingsModel(UiConfigMainMenu::class.java).setToolList(newTools) configure<UiConfigSticker> {
it.setStickerLists(
PersonalStickerAddItem(),
StickerPackEmoticons.getStickerCategory(),
StickerPackShapes.getStickerCategory(),
StickerPackAnimated.getStickerCategory()
)
}
getSettingsModel(UiConfigTheme::class.java).theme = R.style.Imgly_Theme_NoFullscreen getSettingsModel(UiConfigTheme::class.java).theme = R.style.Imgly_Theme_NoFullscreen