List of usage examples for android.view.inputmethod EditorInfo IME_NULL
int IME_NULL
To view the source code for android.view.inputmethod EditorInfo IME_NULL.
Click Source Link
From source file:fr.unix_experience.owncloud_sms.activities.LoginActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_login); // Set up the login form. _protocolView = (Spinner) findViewById(R.id.oc_protocol); _serverView = (EditText) findViewById(R.id.oc_server); _loginView = (EditText) findViewById(R.id.oc_login); _passwordView = (EditText) findViewById(R.id.oc_password); _passwordView.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override/*from w w w .ja va2 s . c o m*/ public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) { if ((id == R.id.oc_login) || (id == EditorInfo.IME_NULL)) { attemptLogin(); return true; } return false; } }); _signInButton = (ActionProcessButton) findViewById(R.id.oc_signin_button); _signInButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { attemptLogin(); } }); mLoginFormView = findViewById(R.id.login_form); mProgressView = findViewById(R.id.login_progress); }
From source file:in.andres.kandroid.ui.LoginActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_login); setupActionBar();//from w w w. j a v a2s. c om // Set up the login form. mServerURLView = (EditText) findViewById(R.id.serverurl); // mAPIKeyView = (EditText) findViewById(R.id.apikey); mUsernameView = (EditText) findViewById(R.id.username); mPasswordView = (EditText) findViewById(R.id.password); mPasswordView.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) { if (id == R.id.login || id == EditorInfo.IME_NULL) { attemptLogin(); return true; } return false; } }); Button mEmailSignInButton = (Button) findViewById(R.id.email_sign_in_button); mEmailSignInButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { attemptLogin(); } }); mLoginFormView = findViewById(R.id.login_form); mProgressView = findViewById(R.id.login_progress); // Load preferences SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this.getApplicationContext()); mServerURLView.setText(preferences.getString("serverurl", "")); // mAPIKeyView.setText(preferences.getString("apikey", "")); mUsernameView.setText(preferences.getString("username", "")); mPasswordView.setText(preferences.getString("password", "")); }
From source file:de.Maxr1998.xposed.maxlock.ui.settings.lockingtype.PinSetupFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { rootView = (ViewGroup) inflater.inflate(R.layout.fragment_pin_setup, container, false); mDescView = (TextView) rootView.findViewById(R.id.description); mSetupPinInput = (EditText) rootView.findViewById(R.id.setup_pin_input); mSetupPinInput.addTextChangedListener(new TextWatcher() { @Override// w w w . jav a 2 s. c o m public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { updateUi(charSequence.length()); } @Override public void afterTextChanged(Editable editable) { } }); mSetupPinInput.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView textView, int actionId, KeyEvent keyEvent) { if (actionId == EditorInfo.IME_NULL || actionId == EditorInfo.IME_ACTION_DONE || actionId == EditorInfo.IME_ACTION_NEXT) { if (mSetupPinInput.getText().length() > 3) { handleStage(); } return true; } return false; } }); mCancelButton = (Button) rootView.findViewById(R.id.button_cancel); mCancelButton.setOnClickListener(this); mNextButton = (Button) rootView.findViewById(R.id.button_positive); mNextButton.setOnClickListener(this); updateUi(0); return rootView; }
From source file:org.envirocar.app.activity.LoginFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { setHasOptionsMenu(true);// w w w .ja v a2 s. com View view = inflater.inflate(R.layout.login_layout, null); mUsernameView = (EditText) view.findViewById(R.id.login_username); mPasswordView = (EditText) view.findViewById(R.id.login_password); mPasswordView.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) { if (id == R.id.login || id == EditorInfo.IME_NULL) { attemptLogin(); return true; } return false; } }); mLoginFormView = view.findViewById(R.id.login_form); mLoginStatusView = view.findViewById(R.id.login_status); mLoginStatusMessageView = (TextView) view.findViewById(R.id.login_status_message); view.findViewById(R.id.sign_in_button).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { attemptLogin(); } }); view.findViewById(R.id.not_yet_registered_button).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { openRegisterFragment(); } }); return view; }
From source file:com.undatech.opaque.dialogs.GetTextFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { android.util.Log.e(TAG, "onCreateView called"); // Set title for this dialog getDialog().setTitle(title);/* www . j av a 2 s . co m*/ View v = inflater.inflate(R.layout.get_text, container, false); textBox = (EditText) v.findViewById(R.id.textBox); if (password) { textBox.setTransformationMethod(new PasswordTransformationMethod()); textBox.setOnEditorActionListener(new OnEditorActionListener() { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { boolean consumed = false; if (actionId == EditorInfo.IME_NULL) { getDialog().dismiss(); consumed = true; } return consumed; } }); } return v; }
From source file:com.todoroo.astrid.actfm.CommentsFragment.java
protected void setUpUpdateList() { final ImageButton commentButton = (ImageButton) getView().findViewById(R.id.commentButton); addCommentField = (EditText) getView().findViewById(R.id.commentField); addCommentField.setOnEditorActionListener(new OnEditorActionListener() { @Override/* w ww. j a v a 2 s. co m*/ public boolean onEditorAction(TextView view, int actionId, KeyEvent event) { if (actionId == EditorInfo.IME_NULL && addCommentField.getText().length() > 0) { addComment(); return true; } return false; } }); addCommentField.addTextChangedListener(new TextWatcher() { @Override public void afterTextChanged(Editable s) { commentButton.setVisibility((s.length() > 0) ? View.VISIBLE : View.GONE); } @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { // } @Override public void onTextChanged(CharSequence s, int start, int before, int count) { // } }); commentButton.setVisibility(TextUtils.isEmpty(addCommentField.getText()) ? View.GONE : View.VISIBLE); commentButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { addComment(); } }); final ClearImageCallback clearImage = new ClearImageCallback() { @Override public void clearImage() { picture = null; resetPictureButton(); } }; pictureButton = (ImageButton) getView().findViewById(R.id.picture); pictureButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (picture != null) { ActFmCameraModule.showPictureLauncher(CommentsFragment.this, clearImage); } else { ActFmCameraModule.showPictureLauncher(CommentsFragment.this, null); } } }); refreshUpdatesList(); }
From source file:org.envirocar.app.activity.RegisterFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.register_layout, null); mUsernameView = (EditText) view.findViewById(R.id.register_username); mEmailView = (EditText) view.findViewById(R.id.register_email); mPasswordView = (EditText) view.findViewById(R.id.register_password); mPasswordConfirmView = (EditText) view.findViewById(R.id.register_password_second); mPasswordConfirmView.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override//from w ww . j av a 2 s.com public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) { if (id == R.id.register || id == EditorInfo.IME_NULL) { attemptRegister(); return true; } return false; } }); mRegisterFormView = view.findViewById(R.id.register_form); mRegisterStatusView = view.findViewById(R.id.register_status); mRegisterStatusMessageView = (TextView) view.findViewById(R.id.register_status_message); view.findViewById(R.id.register_button).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { attemptRegister(); } }); return view; }
From source file:org.gege.caldavsyncadapter.authenticator.AuthenticatorActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mAccountManager = AccountManager.get(this); setContentView(R.layout.activity_authenticator); // Set up the login form. mUser = getIntent().getStringExtra(EXTRA_EMAIL); mUserView = (EditText) findViewById(R.id.user); mUserView.setText(mUser);/*from w w w . j a v a 2s. c o m*/ mContext = getBaseContext(); mPasswordView = (EditText) findViewById(R.id.password); mPasswordView.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) { if (id == R.id.login || id == EditorInfo.IME_NULL) { attemptLogin(); return true; } return false; } }); mURLView = (EditText) findViewById(R.id.url); mLoginFormView = findViewById(R.id.login_form); mLoginStatusView = findViewById(R.id.login_status); mLoginStatusMessageView = (TextView) findViewById(R.id.login_status_message); findViewById(R.id.sign_in_button).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { attemptLogin(); } }); }
From source file:org.musicbrainz.mobile.activity.BarcodeSearchActivity.java
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (v.getId() == R.id.barcode_search && actionId == EditorInfo.IME_NULL) { doSearch();/*from w ww .j a v a 2 s.co m*/ } return false; }
From source file:com.google.maps.android.utils.demo.HeatmapsPlacesDemoActivity.java
@Override protected void startDemo() { EditText editText = (EditText) findViewById(R.id.input_text); editText.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override/*from w w w .j a va2 s. co m*/ public boolean onEditorAction(TextView textView, int actionId, KeyEvent keyEvent) { boolean handled = false; if (actionId == EditorInfo.IME_NULL) { submit(); handled = true; } return handled; } }); mCheckboxLayout = (LinearLayout) findViewById(R.id.checkboxes); setUpMap(); }