mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Forwarding touch events from floating header to recyclerview.
Additionally adds little sidepadding to the tabs buttons and fixes yPos calculations for the scrollbar. Bug: 69966700 Change-Id: I9d236ce7a782090f5d17931839f24b65b4ce7019
This commit is contained in:
@@ -17,13 +17,11 @@
|
||||
package com.android.launcher3;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.android.launcher3.views.RecyclerViewFastScroller;
|
||||
|
||||
@@ -91,8 +89,10 @@ public abstract class BaseRecyclerView extends RecyclerView
|
||||
*/
|
||||
private boolean handleTouchEvent(MotionEvent ev) {
|
||||
// Move to mScrollbar's coordinate system.
|
||||
int left = getLeft() - mScrollbar.getLeft();
|
||||
int top = getTop() - mScrollbar.getTop();
|
||||
// We need to take parent into account (view pager's location)
|
||||
ViewGroup parent = (ViewGroup) getParent();
|
||||
int left = parent.getLeft() + getLeft() - mScrollbar.getLeft();
|
||||
int top = parent.getTop() + getTop() - mScrollbar.getTop() - getScrollBarTop();
|
||||
ev.offsetLocation(left, top);
|
||||
try {
|
||||
return mScrollbar.handleTouchEvent(ev);
|
||||
|
||||
Reference in New Issue
Block a user