Java Code Examples for android.view.View#OnKeyListener

The following examples show how to use android.view.View#OnKeyListener . 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 check out the related API usage on the sidebar.
Example 1
Source File: EditTextUtil.java    From MVPAndroidBootstrap with 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 2
Source File: EditTextUtil.java    From RxAndroidBootstrap with 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 File: KeyRelativeLayout.java    From timecat with 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 File: GridBuilder.java    From GridBuilder with Apache License 2.0 4 votes vote down vote up
public GridBuilder setOnKeyListener(View.OnKeyListener l) {
    this.mOnKeyListener = l;
    return this;
}
 
Example 5
Source File: PopupWindow.java    From Noyze with Apache License 2.0 4 votes vote down vote up
public void setOnDispatchKeyListener(View.OnKeyListener onDispatchKeyListener) {
	mOnDispatchKeyListener = onDispatchKeyListener;
}
 
Example 6
Source File: DSL.java    From anvil with MIT License 4 votes vote down vote up
public static Void onKey(View.OnKeyListener arg) {
  return BaseDSL.attr("onKey", arg);
}
 
Example 7
Source File: DSL.java    From anvil with MIT License 4 votes vote down vote up
public static Void onKey(View.OnKeyListener arg) {
  return BaseDSL.attr("onKey", arg);
}
 
Example 8
Source File: ListHolder.java    From dialogplus with Apache License 2.0 4 votes vote down vote up
@Override public void setOnKeyListener(View.OnKeyListener keyListener) {
  this.keyListener = keyListener;
}
 
Example 9
Source File: GridHolder.java    From dialogplus with Apache License 2.0 4 votes vote down vote up
@Override public void setOnKeyListener(View.OnKeyListener keyListener) {
  this.keyListener = keyListener;
}
 
Example 10
Source File: ViewHolder.java    From dialogplus with Apache License 2.0 4 votes vote down vote up
@Override public void setOnKeyListener(View.OnKeyListener keyListener) {
  this.keyListener = keyListener;
}
 
Example 11
Source File: PopupWindow.java    From Noyze with Apache License 2.0 4 votes vote down vote up
public void setOnDispatchKeyListener(View.OnKeyListener onDispatchKeyListener) {
	mOnDispatchKeyListener = onDispatchKeyListener;
}
 
Example 12
Source File: Holder.java    From dialogplus with Apache License 2.0 votes vote down vote up
void setOnKeyListener(View.OnKeyListener keyListener);