title: Android EditText : getting entered text
body: <p>I want to get the after entered text.I  have done using <code>TextWatcher</code>.</p>
  
  <p>There are some issues:</p>
  
  <p>For example I want to enter 32.5. In that method I want to add to  <code>SET&lt;Product&gt;</code>. </p>
  
  <p>Here each &amp; every number its saving object.That means after enter 3 its add Product object into SET, then add 2 then also adding...</p>
  
  <p>I want to avoid. Once I finish enter <code>EditText</code>,Then want to take it: </p>
  
  <pre><code>final EditText txtQty = new EditText(this);
  txtQty.addTextChangedListener(new TextWatcher() {
     public void afterTextChanged(Editable s) { 
     Log.v("TAG", "afterTextChanged" + s.toString());
     String enterdPrice = txtPrice.getText().toString();
     double remainQty =0.00;
     Product enterdProduct = new Product();
     try{
        String enteredQty = s.toString();
        enterdProduct.setProductCode(txtCode.getText().toString());
        enterdProduct.setPrice(Double.parseDouble(enterdPrice));
        //enterdProduct.setQty(Double.parseDouble(enteredQty));
        // TO-DO  
        if (productSet.contains(enterdProduct)) {
            productSet.remove(enterdProduct);
        }
        productSet.add(enterdProduct);
  
        System.out.println("SIZE --" + productSet.size());
     }
     catch (Exception e) {
      e.printStackTrace();
      }
  });      
  </code></pre>
  
  <p>Please give me idea, How we can get the EditText once enter I enetred text?</p>