My question is very simple, but I can not understand it. I have an application that allows users to enter a value in the EditText field. I need to create a String variable that stores this input. It must be a String variable using findViewById does not work. I donβt understand why I canβt find a solution, so if you could help!
Drew
Like this
// get EditText by id and store it into "inputTxt" EditText inputTxt = (EditText) findViewById(R.id.input); // Store EditText - Input in variable String typedText = inputTxt.getText().toString();
use your_edit_box.getText (). toString () to get the text entered in the edit box. Maybe it is useful
Get the value of the text edit field