Modifying wallpapers customization page to look like widgets.
- Disallowing touch handling when there are no children Change-Id: I925d6f1f862f8c7994a80c4eaacc80f8d59f6ab2
This commit is contained in:
1 parent
0811495e24
commit
45e1d6ec0a
10 files changed
+193
-194
No files matched your search
@@ -621,6 +621,9 @@ public abstract class PagedView extends ViewGroup {
|
||||
* scrolling there.
|
||||
*/
|
||||
|
||||
// Skip touch handling if there are no pages to swipe
|
||||
if (getChildCount() <= 0) return super.onInterceptTouchEvent(ev);
|
||||
|
||||
/*
|
||||
* Shortcut the most recurring case: the user is in the dragging
|
||||
* state and he is moving his finger. We want to intercept this
|
||||
@@ -775,6 +778,9 @@ public abstract class PagedView extends ViewGroup {
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent ev) {
|
||||
// Skip touch handling if there are no pages to swipe
|
||||
if (getChildCount() <= 0) return super.onTouchEvent(ev);
|
||||
|
||||
acquireVelocityTrackerAndAddMovement(ev);
|
||||
|
||||
final int action = ev.getAction();
|
||||
|
||||
Reference in new issue
Block a user