diff --git a/app/build.gradle b/app/build.gradle index 161d4d82b..047a51425 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -37,7 +37,7 @@ android { } dependencies { - compile 'com.simplemobiletools:commons:2.24.0' + compile 'com.simplemobiletools:commons:2.24.1' compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0' compile 'com.theartofdev.edmodo:android-image-cropper:2.4.0' compile 'com.bignerdranch.android:recyclerview-multiselect:0.2' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/SlideshowDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/SlideshowDialog.kt index a3b9aae99..18b97c326 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/SlideshowDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/SlideshowDialog.kt @@ -4,6 +4,7 @@ import android.support.v7.app.AlertDialog import android.view.LayoutInflater import android.view.View import android.view.WindowManager +import com.simplemobiletools.commons.extensions.hideKeyboard import com.simplemobiletools.commons.extensions.setupDialogStuff import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.activities.SimpleActivity @@ -11,6 +12,7 @@ import com.simplemobiletools.gallery.extensions.config import com.simplemobiletools.gallery.helpers.SLIDESHOW_DEFAULT_INTERVAL import kotlinx.android.synthetic.main.dialog_slideshow.view.* + class SlideshowDialog(val activity: SimpleActivity, val callback: () -> Unit) { val dialog: AlertDialog val view: View @@ -25,19 +27,28 @@ class SlideshowDialog(val activity: SimpleActivity, val callback: () -> Unit) { } } + interval_value.setOnFocusChangeListener { v, hasFocus -> + if (!hasFocus) + activity.hideKeyboard(v) + } + include_videos_holder.setOnClickListener { + interval_value.clearFocus() include_videos.toggle() } random_order_holder.setOnClickListener { + interval_value.clearFocus() random_order.toggle() } use_fade_holder.setOnClickListener { + interval_value.clearFocus() use_fade.toggle() } move_backwards_holder.setOnClickListener { + interval_value.clearFocus() move_backwards.toggle() } } diff --git a/app/src/main/res/layout/dialog_slideshow.xml b/app/src/main/res/layout/dialog_slideshow.xml index 398f667ac..7679ec6d9 100644 --- a/app/src/main/res/layout/dialog_slideshow.xml +++ b/app/src/main/res/layout/dialog_slideshow.xml @@ -5,8 +5,6 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - -