Setting scroll X, Y and related attributes for TYPE_VIEW_SCROLLED event.
Change-Id: Idec0e333a0d3c3a0c232d3e2240f18174e0ea88c
This commit is contained in:
parent
bbcf5ac7aa
commit
7066c1235f
|
@ -633,6 +633,11 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
|
|||
if (mCurrentPage != getNextPage()) {
|
||||
AccessibilityEvent ev =
|
||||
AccessibilityEvent.obtain(AccessibilityEvent.TYPE_VIEW_SCROLLED);
|
||||
ev.setScrollable(true);
|
||||
ev.setScrollX(getScrollX());
|
||||
ev.setScrollY(getScrollY());
|
||||
ev.setMaxScrollX(mMaxScrollX);
|
||||
ev.setMaxScrollY(0);
|
||||
|
||||
sendAccessibilityEventUnchecked(ev);
|
||||
}
|
||||
|
@ -2360,7 +2365,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
|
|||
@Override
|
||||
public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
|
||||
super.onInitializeAccessibilityEvent(event);
|
||||
event.setScrollable(true);
|
||||
event.setScrollable(getPageCount() > 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue