data validation dialog box android

Solutions on MaxInterview for data validation dialog box android by the best coders in the world

showing results for - "data validation dialog box android"
Gaspard
26 Jun 2018
1Dialog dialog = new Dialog(this);
2dialog.setContentView(R.layout.your_dialog_file);
3
4Button yourButton = dialog.findViewById(R.id.yourButton);
5final EditText text = dialog.findViewById(R.id.yourTextEdit);
6yourButton.setOnClickListener( {
7
8public void onClick(View view) {
9   if ( ! (text.getText().toString.equals(""))) {
10        //go on here and dismiss dialog
11   }
12
13});