Answers for "edittext get text"

1

how to use edittext get

Button   mButton;
EditText mEdit;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    mButton = (Button)findViewById(R.id.button);
    mEdit   = (EditText)findViewById(R.id.edittext);

    mButton.setOnClickListener(
        new View.OnClickListener()
        {
            public void onClick(View view)
            {
                Log.v("EditText", mEdit.getText().toString());
            }
        });
}
Posted by: Guest on May-30-2021
3

get text from edittext android

EditText myEditText =  (EditText) findViewById(R.id.vnosEmaila);

String text = myEditText.getText().toString();
Posted by: Guest on January-28-2021
0

java android edit text set value

EditText bookInput = (EditText)findViewById(R.id.book);
bookInput.setText("The Shining");
Posted by: Guest on May-13-2020

Code answers related to "edittext get text"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language