From 4f6bf2de5ceccfd93930289b9d490a73c1f9a865 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 8 Jul 2019 22:35:47 +0200 Subject: [PATCH] adding GPS coordinates to the available extended details to show --- app/build.gradle | 2 +- .../gallery/pro/dialogs/ManageExtendedDetailsDialog.kt | 3 +++ .../simplemobiletools/gallery/pro/helpers/Constants.kt | 1 + .../main/res/layout/dialog_manage_extended_details.xml | 8 ++++++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index c0373d9bb..5de9d8164 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -61,7 +61,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.14.13' + implementation 'com.simplemobiletools:commons:5.14.14' implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0' implementation 'androidx.multidex:multidex:2.0.1' implementation 'it.sephiroth.android.exif:library:1.0.1' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/ManageExtendedDetailsDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/ManageExtendedDetailsDialog.kt index e1d6dbf18..22c994284 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/ManageExtendedDetailsDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/ManageExtendedDetailsDialog.kt @@ -25,6 +25,7 @@ class ManageExtendedDetailsDialog(val activity: BaseSimpleActivity, val callback manage_extended_details_duration.isChecked = details and EXT_DURATION != 0 manage_extended_details_artist.isChecked = details and EXT_ARTIST != 0 manage_extended_details_album.isChecked = details and EXT_ALBUM != 0 + manage_extended_details_gps_coordinates.isChecked = details and EXT_GPS != 0 } AlertDialog.Builder(activity) @@ -60,6 +61,8 @@ class ManageExtendedDetailsDialog(val activity: BaseSimpleActivity, val callback result += EXT_ARTIST if (manage_extended_details_album.isChecked) result += EXT_ALBUM + if (manage_extended_details_gps_coordinates.isChecked) + result += EXT_GPS } activity.config.extendedDetails = result diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Constants.kt index 015c12beb..4b33ffecc 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Constants.kt @@ -154,6 +154,7 @@ const val EXT_EXIF_PROPERTIES = 128 const val EXT_DURATION = 256 const val EXT_ARTIST = 512 const val EXT_ALBUM = 1024 +const val EXT_GPS = 2048 // media types const val TYPE_IMAGES = 1 diff --git a/app/src/main/res/layout/dialog_manage_extended_details.xml b/app/src/main/res/layout/dialog_manage_extended_details.xml index 4b42ab9b2..f4e0f751d 100644 --- a/app/src/main/res/layout/dialog_manage_extended_details.xml +++ b/app/src/main/res/layout/dialog_manage_extended_details.xml @@ -78,6 +78,14 @@ android:paddingBottom="@dimen/activity_margin" android:text="@string/exif"/> + +