hide the keyboard at togglig a slideshow setup checkbox
This commit is contained in:
parent
c47ddc536d
commit
3757616a47
3 changed files with 12 additions and 3 deletions
|
@ -37,7 +37,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
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.davemorrissey.labs:subsampling-scale-image-view:3.6.0'
|
||||||
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.0'
|
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.0'
|
||||||
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
|
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
|
||||||
|
|
|
@ -4,6 +4,7 @@ import android.support.v7.app.AlertDialog
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
|
import com.simplemobiletools.commons.extensions.hideKeyboard
|
||||||
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
import com.simplemobiletools.gallery.activities.SimpleActivity
|
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 com.simplemobiletools.gallery.helpers.SLIDESHOW_DEFAULT_INTERVAL
|
||||||
import kotlinx.android.synthetic.main.dialog_slideshow.view.*
|
import kotlinx.android.synthetic.main.dialog_slideshow.view.*
|
||||||
|
|
||||||
|
|
||||||
class SlideshowDialog(val activity: SimpleActivity, val callback: () -> Unit) {
|
class SlideshowDialog(val activity: SimpleActivity, val callback: () -> Unit) {
|
||||||
val dialog: AlertDialog
|
val dialog: AlertDialog
|
||||||
val view: View
|
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 {
|
include_videos_holder.setOnClickListener {
|
||||||
|
interval_value.clearFocus()
|
||||||
include_videos.toggle()
|
include_videos.toggle()
|
||||||
}
|
}
|
||||||
|
|
||||||
random_order_holder.setOnClickListener {
|
random_order_holder.setOnClickListener {
|
||||||
|
interval_value.clearFocus()
|
||||||
random_order.toggle()
|
random_order.toggle()
|
||||||
}
|
}
|
||||||
|
|
||||||
use_fade_holder.setOnClickListener {
|
use_fade_holder.setOnClickListener {
|
||||||
|
interval_value.clearFocus()
|
||||||
use_fade.toggle()
|
use_fade.toggle()
|
||||||
}
|
}
|
||||||
|
|
||||||
move_backwards_holder.setOnClickListener {
|
move_backwards_holder.setOnClickListener {
|
||||||
|
interval_value.clearFocus()
|
||||||
move_backwards.toggle()
|
move_backwards.toggle()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<requestFocus/>
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/slideshow_holder"
|
android:id="@+id/slideshow_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
Loading…
Reference in a new issue