Add delay to drawer and widgets closing
This commit is contained in:
parent
10a06020e8
commit
1913d0b739
|
@ -30,10 +30,7 @@ import androidx.core.graphics.drawable.toBitmap
|
||||||
import androidx.core.view.GestureDetectorCompat
|
import androidx.core.view.GestureDetectorCompat
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
import com.simplemobiletools.commons.helpers.*
|
||||||
import com.simplemobiletools.commons.helpers.isPiePlus
|
|
||||||
import com.simplemobiletools.commons.helpers.isQPlus
|
|
||||||
import com.simplemobiletools.commons.helpers.isRPlus
|
|
||||||
import com.simplemobiletools.launcher.BuildConfig
|
import com.simplemobiletools.launcher.BuildConfig
|
||||||
import com.simplemobiletools.launcher.R
|
import com.simplemobiletools.launcher.R
|
||||||
import com.simplemobiletools.launcher.dialogs.RenameItemDialog
|
import com.simplemobiletools.launcher.dialogs.RenameItemDialog
|
||||||
|
@ -181,8 +178,10 @@ class MainActivity : SimpleActivity(), FlingListener {
|
||||||
override fun onTopResumedActivityChanged(isTopResumedActivity: Boolean) {
|
override fun onTopResumedActivityChanged(isTopResumedActivity: Boolean) {
|
||||||
super.onTopResumedActivityChanged(isTopResumedActivity)
|
super.onTopResumedActivityChanged(isTopResumedActivity)
|
||||||
if (!isTopResumedActivity) {
|
if (!isTopResumedActivity) {
|
||||||
hideFragment(all_apps_fragment)
|
Handler(mainLooper).postDelayed({
|
||||||
hideFragment(widgets_fragment)
|
hideFragment(all_apps_fragment)
|
||||||
|
hideFragment(widgets_fragment)
|
||||||
|
}, 1000L)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue