diff --git a/app/build.gradle b/app/build.gradle index 8291d98c6..513bdd07c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -44,7 +44,7 @@ dependencies { compile 'com.booking:rtlviewpager:1.0.1' compile 'com.simplemobiletools:fileproperties:1.0.7@aar' compile 'com.simplemobiletools:filepicker:1.6.1@aar' - compile 'com.simplemobiletools:commons:1.0.2@aar' + compile 'com.simplemobiletools:commons:1.0.3@aar' compile 'com.bignerdranch.android:recyclerview-multiselect:0.2' compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 23edd0705..310824c95 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -71,7 +71,7 @@ android:parentActivityName=".activities.MainActivity"/> diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/LicenseActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/LicenseActivity.kt deleted file mode 100644 index 0ed092a04..000000000 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/LicenseActivity.kt +++ /dev/null @@ -1,29 +0,0 @@ -package com.simplemobiletools.gallery.activities - -import android.content.Intent -import android.net.Uri -import android.os.Bundle -import com.simplemobiletools.gallery.R -import kotlinx.android.synthetic.main.activity_license.* - -class LicenseActivity : SimpleActivity() { - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.activity_license) - - license_kotlin_title.setOnClickListener { openUrl(R.string.kotlin_url) } - license_subsampling_title.setOnClickListener { openUrl(R.string.subsampling_url) } - license_glide_title.setOnClickListener { openUrl(R.string.glide_url) } - license_cropper_title.setOnClickListener { openUrl(R.string.cropper_url) } - license_multiselect_title.setOnClickListener { openUrl(R.string.multiselect_url) } - license_rtl_viewpager_title.setOnClickListener { openUrl(R.string.rtl_viewpager_url) } - license_filepicker_title.setOnClickListener { openUrl(R.string.filepicker_url) } - license_fileproperties_title.setOnClickListener { openUrl(R.string.fileproperties_url) } - } - - private fun openUrl(id: Int) { - val url = resources.getString(id) - val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(url)) - startActivity(browserIntent) - } -} diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt index f96a43764..7958dfe3c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt @@ -10,9 +10,11 @@ import android.view.KeyCharacterMap import android.view.KeyEvent import android.view.View import android.view.ViewConfiguration +import com.simplemobiletools.commons.helpers.* import com.simplemobiletools.filepicker.extensions.getMimeType import com.simplemobiletools.filepicker.extensions.toast import com.simplemobiletools.gallery.R +import com.simplemobiletools.gallery.activities.SimpleActivity import com.simplemobiletools.gallery.helpers.REQUEST_EDIT_IMAGE import com.simplemobiletools.gallery.helpers.REQUEST_SET_WALLPAPER import com.simplemobiletools.gallery.models.Medium @@ -107,6 +109,11 @@ fun Activity.hasNavBar(): Boolean { } } +fun SimpleActivity.launchAbout() { + startAboutActivity(R.string.app_name, LICENSE_KOTLIN or LICENSE_SUBSAMPLING or LICENSE_GLIDE or LICENSE_CROPPER or + LICENSE_MULTISELECT or LICENSE_RTL or LICENSE_FILEPICKER or LICENSE_FILEPROPERTIES) +} + fun AppCompatActivity.showSystemUI() { supportActionBar?.show() window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_STABLE or diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/context.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/context.kt index aafb8d58c..524e192e7 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/context.kt @@ -5,7 +5,6 @@ import android.content.Intent import android.database.Cursor import android.net.Uri import android.provider.MediaStore -import com.simplemobiletools.commons.activities.AboutActivity import com.simplemobiletools.filepicker.extensions.humanizePath import com.simplemobiletools.gallery.activities.SettingsActivity @@ -36,7 +35,3 @@ fun Context.launchCamera() { fun Context.launchSettings() { startActivity(Intent(this, SettingsActivity::class.java)) } - -fun Context.launchAbout() { - startActivity(Intent(this, AboutActivity::class.java)) -} diff --git a/app/src/main/res/layout/activity_license.xml b/app/src/main/res/layout/activity_license.xml deleted file mode 100644 index 4b2871493..000000000 --- a/app/src/main/res/layout/activity_license.xml +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -