Merge "Disable side swiping on RTL languages" into rvc-dev am: 46b4296beb am: e0624684c9 am: 48babc1ffe
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11880480 Change-Id: I9a5c898630c24c4d661bd615f91ccbbd5e4bdace
This commit is contained in:
@@ -74,12 +74,16 @@ public class ResolverViewPager extends ViewPager {
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether swiping sideways should happen.
|
||||
* <p>Note that swiping is always disabled for RTL layouts (b/159110029 for context).
|
||||
*/
|
||||
void setSwipingEnabled(boolean swipingEnabled) {
|
||||
mSwipingEnabled = swipingEnabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onInterceptTouchEvent(MotionEvent ev) {
|
||||
return mSwipingEnabled && super.onInterceptTouchEvent(ev);
|
||||
return !isLayoutRtl() && mSwipingEnabled && super.onInterceptTouchEvent(ev);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user