Merge "Reverse movement direction of DPAD events" into jb-mr1-aah-dev

This commit is contained in:
Justin Mattson
2012-10-08 12:52:36 -07:00
committed by Android (Google) Code Review

View File

@@ -948,13 +948,13 @@ public class NumberPicker extends LinearLayout {
}
switch (event.getAction()) {
case KeyEvent.ACTION_DOWN:
if (mWrapSelectorWheel || (keyCode == KeyEvent.KEYCODE_DPAD_UP)
if (mWrapSelectorWheel || (keyCode == KeyEvent.KEYCODE_DPAD_DOWN)
? getValue() < getMaxValue() : getValue() > getMinValue()) {
requestFocus();
mLastHandledDownDpadKeyCode = keyCode;
removeAllCallbacks();
if (mFlingScroller.isFinished()) {
changeValueByOne(keyCode == KeyEvent.KEYCODE_DPAD_UP);
changeValueByOne(keyCode == KeyEvent.KEYCODE_DPAD_DOWN);
}
return true;
}