Merge "Fix scrolling in WidgetsBottomSheet" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
365c3c8f09
@@ -26,6 +26,7 @@ import android.util.IntProperty;
|
||||
import android.util.Pair;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.animation.Interpolator;
|
||||
@@ -152,6 +153,19 @@ public class WidgetsBottomSheet extends BaseWidgetSheet implements Insettable {
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onControllerInterceptTouchEvent(MotionEvent ev) {
|
||||
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
|
||||
mNoIntercept = false;
|
||||
ScrollView scrollView = findViewById(R.id.widgets_table_scroll_view);
|
||||
if (getPopupContainer().isEventOverView(scrollView, ev)
|
||||
&& scrollView.getScrollY() > 0) {
|
||||
mNoIntercept = true;
|
||||
}
|
||||
}
|
||||
return super.onControllerInterceptTouchEvent(ev);
|
||||
}
|
||||
|
||||
protected WidgetCell addItemCell(ViewGroup parent) {
|
||||
WidgetCell widget = (WidgetCell) LayoutInflater.from(getContext())
|
||||
.inflate(R.layout.widget_cell, parent, false);
|
||||
|
||||
Reference in New Issue
Block a user