android change text input to coordinates code example
Example 1: java android edit text set value
EditText bookInput = (EditText)findViewById(R.id.book);
bookInput.setText("The Shining");
Example 2: action on long press of edit edittext
Button button = (Button)findViewById(R.id.b1);
button.setOnLongClickListener(
new Button.OnLongClickListener() {
public boolean onLongClick (View V){
EditText e1 = (EditText) findViewById(R.id.editText);
android.widget.TextView tv = (android.widget.TextView) findViewById(R.id.t1);
tv.setText("long data "+e1.getText());
return true;
}
}
);