mLastTouchMode = touchMode;
}
+ @Override
+ public void onRtlPropertiesChanged(int layoutDirection) {
+ super.onRtlPropertiesChanged(layoutDirection);
+
+ if (mFastScroller != null) {
+ mFastScroller.setScrollbarPosition(getVerticalScrollbarPosition());
+ }
+ }
+
/**
* Creates the ContextMenuInfo returned from {@link #getContextMenuInfo()}. This
* methods knows the view, position and ID of the item that received the
mHandler.removeCallbacks(mScrollFade);
break;
case STATE_EXIT:
- int viewWidth = mList.getWidth();
- mList.invalidate(viewWidth - mThumbW, mThumbY, viewWidth, mThumbY + mThumbH);
+ final int viewWidth = mList.getWidth();
+ final int top = mThumbY;
+ final int bottom = mThumbY + mThumbH;
+ final int left;
+ final int right;
+ switch (mList.getLayoutDirection()) {
+ case View.LAYOUT_DIRECTION_RTL:
+ left = 0;
+ right = mThumbW;
+ break;
+ case View.LAYOUT_DIRECTION_LTR:
+ default:
+ left = viewWidth - mThumbW;
+ right = viewWidth;
+ }
+ mList.invalidate(left, top, right, bottom);
break;
}
mState = state;
} else if (mState == STATE_EXIT) {
if (alpha == 0) { // Done with exit
setState(STATE_NONE);
- } else if (mTrackDrawable != null) {
- mList.invalidate(viewWidth - mThumbW, 0, viewWidth, mList.getHeight());
} else {
- mList.invalidate(viewWidth - mThumbW, y, viewWidth, y + mThumbH);
+ final int left, right, top, bottom;
+ if (mTrackDrawable != null) {
+ top = 0;
+ bottom = mList.getHeight();
+ } else {
+ top = y;
+ bottom = y + mThumbH;
+ }
+ switch (mList.getLayoutDirection()) {
+ case View.LAYOUT_DIRECTION_RTL:
+ left = 0;
+ right = mThumbW;
+ break;
+ case View.LAYOUT_DIRECTION_LTR:
+ default:
+ left = viewWidth - mThumbW;
+ right = viewWidth;
+ }
+ mList.invalidate(left, top, right, bottom);
}
}
}