Articles → Android → edittext in android

edittext in android






What is edittext?





How to add edit text?




Picture showing adding the plain text control in android

Click to Enlarge


Get and set the value of edit text




EditText editText = (EditText)findViewById(R.id.editText);

//  Setting the value
editText.setText("Test");

// Get the value
Log.v("Edit Text Value", editText.getText().toString());




Picture showing the value of the edit text in log window

Click to Enlarge

Picture showing the value displayed in the edit text in android

Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, November 13, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250