If we want to submit some values ,we generally use 'Buttons'.And inside Button click,we wrote codes..
We can also pass values through softKeyboard.
phonecode = (EditText) findViewById(R.id.et_phonecode);
phonecode.setOnKeyListener(new OnKeyListener() {
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
// TODO Auto-generated method stub
if (keyCode == KeyEvent.KEYCODE_ENTER)
{
// put some code here----------------//
}
We can also pass values through softKeyboard.
phonecode = (EditText) findViewById(R.id.et_phonecode);
phonecode.setOnKeyListener(new OnKeyListener() {
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
// TODO Auto-generated method stub
if (keyCode == KeyEvent.KEYCODE_ENTER)
{
// put some code here----------------//
}
0 comments: