Java Code Examples for android.view.View#OnKeyListener

The following examples show how to use android.view.View#OnKeyListener . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
public static View.OnKeyListener getSoftInPutHideListener(final Context context) {

        View.OnKeyListener onKeyList = new View.OnKeyListener() {

            @Override
            public boolean onKey(View v, int keyCode, KeyEvent event) {
                if ((event.getAction() == KeyEvent.ACTION_DOWN) && (keyCode == KeyEvent.KEYCODE_ENTER)) {
                    EditTextUtil.hideSoftInPut((EditText) v, context);
                    return true;
                }
                return false;
            }
        };

        return onKeyList;
    }
 
Example 2
Source Project: RxAndroidBootstrap   File: EditTextUtil.java    License: Apache License 2.0 6 votes vote down vote up
public static View.OnKeyListener getSoftInPutHideListener(final Context context) {

        View.OnKeyListener onKeyList = new View.OnKeyListener() {

            @Override
            public boolean onKey(View v, int keyCode, KeyEvent event) {
                if ((event.getAction() == KeyEvent.ACTION_DOWN) && (keyCode == KeyEvent.KEYCODE_ENTER)) {
                    EditTextUtil.hideSoftInPut((EditText) v, context);
                    return true;
                }
                return false;
            }
        };

        return onKeyList;
    }
 
Example 3
Source Project: timecat   File: KeyRelativeLayout.java    License: Apache License 2.0 4 votes vote down vote up
public void setOnKeyListener(View.OnKeyListener paramOnKeyListener) {
    super.setOnKeyListener(paramOnKeyListener);
    this.a = paramOnKeyListener;
}
 
Example 4
Source Project: GridBuilder   File: GridBuilder.java    License: Apache License 2.0 4 votes vote down vote up
public GridBuilder setOnKeyListener(View.OnKeyListener l) {
    this.mOnKeyListener = l;
    return this;
}
 
Example 5
Source Project: Noyze   File: PopupWindow.java    License: Apache License 2.0 4 votes vote down vote up
public void setOnDispatchKeyListener(View.OnKeyListener onDispatchKeyListener) {
	mOnDispatchKeyListener = onDispatchKeyListener;
}
 
Example 6
Source Project: anvil   File: DSL.java    License: MIT License 4 votes vote down vote up
public static Void onKey(View.OnKeyListener arg) {
  return BaseDSL.attr("onKey", arg);
}
 
Example 7
Source Project: anvil   File: DSL.java    License: MIT License 4 votes vote down vote up
public static Void onKey(View.OnKeyListener arg) {
  return BaseDSL.attr("onKey", arg);
}
 
Example 8
Source Project: dialogplus   File: ListHolder.java    License: Apache License 2.0 4 votes vote down vote up
@Override public void setOnKeyListener(View.OnKeyListener keyListener) {
  this.keyListener = keyListener;
}
 
Example 9
Source Project: dialogplus   File: GridHolder.java    License: Apache License 2.0 4 votes vote down vote up
@Override public void setOnKeyListener(View.OnKeyListener keyListener) {
  this.keyListener = keyListener;
}
 
Example 10
Source Project: dialogplus   File: ViewHolder.java    License: Apache License 2.0 4 votes vote down vote up
@Override public void setOnKeyListener(View.OnKeyListener keyListener) {
  this.keyListener = keyListener;
}
 
Example 11
Source Project: Noyze   File: PopupWindow.java    License: Apache License 2.0 4 votes vote down vote up
public void setOnDispatchKeyListener(View.OnKeyListener onDispatchKeyListener) {
	mOnDispatchKeyListener = onDispatchKeyListener;
}
 
Example 12
Source Project: dialogplus   File: Holder.java    License: Apache License 2.0 votes vote down vote up
void setOnKeyListener(View.OnKeyListener keyListener);