Merge pull request #148 from esensar/fix/147-widgets-stealing-touches
Ensure HomeScreenGrid steals touches from widgets when folder is open
This commit is contained in:
commit
8bdbae498e
|
@ -20,6 +20,7 @@ import android.text.TextUtils
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import android.util.Size
|
import android.util.Size
|
||||||
import android.util.SizeF
|
import android.util.SizeF
|
||||||
|
import android.view.MotionEvent
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.animation.DecelerateInterpolator
|
import android.view.animation.DecelerateInterpolator
|
||||||
import android.view.animation.OvershootInterpolator
|
import android.view.animation.OvershootInterpolator
|
||||||
|
@ -1511,6 +1512,14 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onInterceptTouchEvent(ev: MotionEvent?): Boolean {
|
||||||
|
return if (currentlyOpenFolder != null) {
|
||||||
|
true
|
||||||
|
} else {
|
||||||
|
super.onInterceptTouchEvent(ev)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun Canvas.drawItemInCell(item: HomeScreenGridItem, cell: Rect) {
|
private fun Canvas.drawItemInCell(item: HomeScreenGridItem, cell: Rect) {
|
||||||
if (item.id != draggedItem?.id) {
|
if (item.id != draggedItem?.id) {
|
||||||
val drawableX = cell.left + iconMargin
|
val drawableX = cell.left + iconMargin
|
||||||
|
|
Loading…
Reference in New Issue