mirror of
https://github.com/SimpleMobileTools/Simple-Launcher.git
synced 2025-03-04 03:07:44 +01:00
fixing a glitch at scrolling fragments
This commit is contained in:
parent
7d01cbf25d
commit
97d147dfd0
@ -358,8 +358,10 @@ class MainActivity : SimpleActivity(), FlingListener {
|
||||
Handler().postDelayed({
|
||||
if (fragment is AllAppsFragment) {
|
||||
fragment.all_apps_grid.scrollToPosition(0)
|
||||
fragment.touchDownY = -1
|
||||
} else if (fragment is WidgetsFragment) {
|
||||
fragment.widgets_list.scrollToPosition(0)
|
||||
fragment.touchDownY = -1
|
||||
}
|
||||
}, ANIMATION_DURATION)
|
||||
}
|
||||
|
@ -21,8 +21,8 @@ import com.simplemobiletools.launcher.models.HomeScreenGridItem
|
||||
import kotlinx.android.synthetic.main.all_apps_fragment.view.*
|
||||
|
||||
class AllAppsFragment(context: Context, attributeSet: AttributeSet) : MyFragment(context, attributeSet), AllAppsListener {
|
||||
private var touchDownY = -1
|
||||
private var lastTouchCoords = Pair(0f, 0f)
|
||||
var touchDownY = -1
|
||||
var ignoreTouches = false
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
|
@ -23,10 +23,9 @@ import com.simplemobiletools.launcher.interfaces.WidgetsFragmentListener
|
||||
import com.simplemobiletools.launcher.models.*
|
||||
import kotlinx.android.synthetic.main.widgets_fragment.view.*
|
||||
|
||||
|
||||
class WidgetsFragment(context: Context, attributeSet: AttributeSet) : MyFragment(context, attributeSet), WidgetsFragmentListener {
|
||||
private var touchDownY = -1
|
||||
private var lastTouchCoords = Pair(0f, 0f)
|
||||
var touchDownY = -1
|
||||
var ignoreTouches = false
|
||||
|
||||
override fun setupFragment(activity: MainActivity) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user