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;
}
}
);
Also in Java:
- java methods
- entre clavier java
- java set example
- formatting an integer in java
- 2 decimal places print format JAVA
- Java int to roman
- java for
- keep jframe on top
- java hashmap set value
- create java windows application
- java nested loop
- javafx action event enter key
- java random integer
- Enums injava
- read lines of file randomly java
- android java convert double to 2 decimal places
- how to reverse a list in java
- javafx detect collision
- difference between compile and execute in java
- continue in java
- java insert into arraylist
- how to print in java
- jsonobject to java object
- java print type of object