-1

does any know how I should to decalre and initialize the Scanner method for scan typed text in the application?

When you want to scan your own text, that you type with your own Keyboard, you have to use (System.in). But what have to stand in the brackets, when you want to scan what anybody type in the application

Kris
  • 19
  • 1

1 Answers1

0

Here you can read text inside edittext.

public class RateListActivity extends AppCompatActivity {

    public EditText et_Name;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_rate_list);
        et_Name = (EditText)findViewById(R.id.et_Name);

        String name = et_Name.getText().toString();
    } 
}

for more link for reference https://stackoverflow.com/questions/4531396/get-value-of-a-edit-text-field and How can I get the value from EditText in android?

Community
  • 1
  • 1
Ashish Kudale
  • 1,230
  • 1
  • 27
  • 51