Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

data validation dialog box android

Dialog dialog = new Dialog(this);
dialog.setContentView(R.layout.your_dialog_file);

Button yourButton = dialog.findViewById(R.id.yourButton);
final EditText text = dialog.findViewById(R.id.yourTextEdit);
yourButton.setOnClickListener( {

public void onClick(View view) {
   if ( ! (text.getText().toString.equals(""))) {
        //go on here and dismiss dialog
   }

});
 
PREVIOUS NEXT
Tagged: #data #validation #dialog #box #android
ADD COMMENT
Topic
Name
9+4 =