Main navigation

Reader Interactions

Comments

  1. Very good example. But How can I differentiate between edit Text while gettting data using getText() method as their ids are same?

    • Simply call findViewById wrt the inflated view like ,

      EditText edittext_var ;

      public void onSelect(View v) { // on click event for a SELECT button

      edittext_var = (EditText)((View) v.getParent()).findViewById(R.id.number_edit_text) ;

      System.out.println(“The text is = “+ et.getText());
      }

Leave a Reply

Advertisment ad adsense adlogger