Merge "Process numpad enter key along with enter key." into rvc-dev am: b22931a0fb
Change-Id: Ia656957865c3d95de3bf8d5296060903d0cf26a1
This commit is contained in:
@@ -5863,6 +5863,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
|
|||||||
case KeyEvent.KEYCODE_DPAD_RIGHT:
|
case KeyEvent.KEYCODE_DPAD_RIGHT:
|
||||||
case KeyEvent.KEYCODE_DPAD_CENTER:
|
case KeyEvent.KEYCODE_DPAD_CENTER:
|
||||||
case KeyEvent.KEYCODE_ENTER:
|
case KeyEvent.KEYCODE_ENTER:
|
||||||
|
case KeyEvent.KEYCODE_NUMPAD_ENTER:
|
||||||
okToSend = false;
|
okToSend = false;
|
||||||
break;
|
break;
|
||||||
case KeyEvent.KEYCODE_BACK:
|
case KeyEvent.KEYCODE_BACK:
|
||||||
|
|||||||
@@ -821,6 +821,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
|
|||||||
// was a click, the text view gets the selected item
|
// was a click, the text view gets the selected item
|
||||||
// from the drop down as its content
|
// from the drop down as its content
|
||||||
case KeyEvent.KEYCODE_ENTER:
|
case KeyEvent.KEYCODE_ENTER:
|
||||||
|
case KeyEvent.KEYCODE_NUMPAD_ENTER:
|
||||||
case KeyEvent.KEYCODE_DPAD_CENTER:
|
case KeyEvent.KEYCODE_DPAD_CENTER:
|
||||||
case KeyEvent.KEYCODE_TAB:
|
case KeyEvent.KEYCODE_TAB:
|
||||||
if (event.hasNoModifiers()) {
|
if (event.hasNoModifiers()) {
|
||||||
|
|||||||
1
core/java/android/widget/ListPopupWindow.java
Normal file → Executable file
1
core/java/android/widget/ListPopupWindow.java
Normal file → Executable file
@@ -1005,6 +1005,7 @@ public class ListPopupWindow implements ShowableListMenu {
|
|||||||
case KeyEvent.KEYCODE_DPAD_CENTER:
|
case KeyEvent.KEYCODE_DPAD_CENTER:
|
||||||
case KeyEvent.KEYCODE_DPAD_DOWN:
|
case KeyEvent.KEYCODE_DPAD_DOWN:
|
||||||
case KeyEvent.KEYCODE_DPAD_UP:
|
case KeyEvent.KEYCODE_DPAD_UP:
|
||||||
|
case KeyEvent.KEYCODE_NUMPAD_ENTER:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1033,6 +1033,7 @@ public class NumberPicker extends LinearLayout {
|
|||||||
switch (keyCode) {
|
switch (keyCode) {
|
||||||
case KeyEvent.KEYCODE_DPAD_CENTER:
|
case KeyEvent.KEYCODE_DPAD_CENTER:
|
||||||
case KeyEvent.KEYCODE_ENTER:
|
case KeyEvent.KEYCODE_ENTER:
|
||||||
|
case KeyEvent.KEYCODE_NUMPAD_ENTER:
|
||||||
removeAllCallbacks();
|
removeAllCallbacks();
|
||||||
break;
|
break;
|
||||||
case KeyEvent.KEYCODE_DPAD_DOWN:
|
case KeyEvent.KEYCODE_DPAD_DOWN:
|
||||||
|
|||||||
3
core/java/android/widget/SearchView.java
Normal file → Executable file
3
core/java/android/widget/SearchView.java
Normal file → Executable file
@@ -1076,7 +1076,8 @@ public class SearchView extends LinearLayout implements CollapsibleActionView {
|
|||||||
// The search key is handled by the dialog's onKeyDown().
|
// The search key is handled by the dialog's onKeyDown().
|
||||||
if (!mSearchSrcTextView.isEmpty() && event.hasNoModifiers()) {
|
if (!mSearchSrcTextView.isEmpty() && event.hasNoModifiers()) {
|
||||||
if (event.getAction() == KeyEvent.ACTION_UP) {
|
if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||||
if (keyCode == KeyEvent.KEYCODE_ENTER) {
|
if (keyCode == KeyEvent.KEYCODE_ENTER
|
||||||
|
|| keyCode == KeyEvent.KEYCODE_NUMPAD_ENTER) {
|
||||||
v.cancelLongPress();
|
v.cancelLongPress();
|
||||||
|
|
||||||
// Launch as a regular search.
|
// Launch as a regular search.
|
||||||
|
|||||||
@@ -420,6 +420,7 @@ class SimpleMonthView extends View {
|
|||||||
break;
|
break;
|
||||||
case KeyEvent.KEYCODE_DPAD_CENTER:
|
case KeyEvent.KEYCODE_DPAD_CENTER:
|
||||||
case KeyEvent.KEYCODE_ENTER:
|
case KeyEvent.KEYCODE_ENTER:
|
||||||
|
case KeyEvent.KEYCODE_NUMPAD_ENTER:
|
||||||
if (mHighlightedDay != -1) {
|
if (mHighlightedDay != -1) {
|
||||||
onDayClicked(mHighlightedDay);
|
onDayClicked(mHighlightedDay);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -8359,6 +8359,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
|||||||
|
|
||||||
switch (keyCode) {
|
switch (keyCode) {
|
||||||
case KeyEvent.KEYCODE_ENTER:
|
case KeyEvent.KEYCODE_ENTER:
|
||||||
|
case KeyEvent.KEYCODE_NUMPAD_ENTER:
|
||||||
if (event.hasNoModifiers()) {
|
if (event.hasNoModifiers()) {
|
||||||
// When mInputContentType is set, we know that we are
|
// When mInputContentType is set, we know that we are
|
||||||
// running in a "modern" cupcake environment, so don't need
|
// running in a "modern" cupcake environment, so don't need
|
||||||
@@ -8586,6 +8587,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
|||||||
return super.onKeyUp(keyCode, event);
|
return super.onKeyUp(keyCode, event);
|
||||||
|
|
||||||
case KeyEvent.KEYCODE_ENTER:
|
case KeyEvent.KEYCODE_ENTER:
|
||||||
|
case KeyEvent.KEYCODE_NUMPAD_ENTER:
|
||||||
if (event.hasNoModifiers()) {
|
if (event.hasNoModifiers()) {
|
||||||
if (mEditor != null && mEditor.mInputContentType != null
|
if (mEditor != null && mEditor.mInputContentType != null
|
||||||
&& mEditor.mInputContentType.onEditorActionListener != null
|
&& mEditor.mInputContentType.onEditorActionListener != null
|
||||||
|
|||||||
Reference in New Issue
Block a user