am 381a4236: Merge "When accessibility on cannot click on a view covered by a HorizontalScrollView" into lmp-mr1-dev
* commit '381a423634a293d53f972a0ce4abd7fe7cf7d703': When accessibility on cannot click on a view covered by a HorizontalScrollView
This commit is contained in:
@@ -5938,9 +5938,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
||||
* layer.
|
||||
*
|
||||
* @param outRects List to which to add clickable areas.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
void addClickableRectsForAccessibility(List<RectF> outRects) {
|
||||
if (isClickable() || isLongClickable()) {
|
||||
public void addClickableRectsForAccessibility(List<RectF> outRects) {
|
||||
if (isClickable() || isLongClickable()
|
||||
|| (mListenerInfo != null && mListenerInfo.mOnTouchListener != null)) {
|
||||
RectF bounds = new RectF();
|
||||
bounds.set(0, 0, getWidth(), getHeight());
|
||||
outRects.add(bounds);
|
||||
|
||||
@@ -883,8 +883,11 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@Override
|
||||
void addClickableRectsForAccessibility(List<RectF> outRects) {
|
||||
public void addClickableRectsForAccessibility(List<RectF> outRects) {
|
||||
int sizeBefore = outRects.size();
|
||||
|
||||
super.addClickableRectsForAccessibility(outRects);
|
||||
|
||||
@@ -20,6 +20,7 @@ import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
@@ -757,10 +758,22 @@ public class HorizontalScrollView extends FrameLayout {
|
||||
} else {
|
||||
super.scrollTo(scrollX, scrollY);
|
||||
}
|
||||
|
||||
|
||||
awakenScrollBars();
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@Override
|
||||
public void addClickableRectsForAccessibility(List<RectF> outRects) {
|
||||
// This class always consumes touch events, therefore if it
|
||||
// covers a view we do not want to send a click over it.
|
||||
RectF bounds = new RectF();
|
||||
bounds.set(0, 0, getWidth(), getHeight());
|
||||
outRects.add(bounds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean performAccessibilityAction(int action, Bundle arguments) {
|
||||
if (super.performAccessibilityAction(action, arguments)) {
|
||||
|
||||
Reference in New Issue
Block a user