Answers for "action on long press of edit edittext"

0

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;

            }

        }


        );
Posted by: Guest on May-27-2020

Code answers related to "action on long press of edit edittext"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language