title: Clear Android Edit Text inside a listview
body: <p>I have a edit text and a Save button inside my list view. I have to clear the text when the user clicks the save button. I have tried  like </p>
  
  <pre><code>txtDescription.setText("");
  </code></pre>
  
  <p>But not worked. Any one know why it is not worked ? The Adapter class is attached</p>
  
  <p>Please Help Me, Thanks in Advance!!</p>
  
  <pre><code>private class ListAdapters extends ArrayAdapter&lt;ApplicationBean&gt; {
      private ArrayList&lt;ApplicationBean&gt; items;
      private int position;
  
      public ListAdapters(Context context, int textViewResourceId,
              ArrayList&lt;ApplicationBean&gt; mTitleList) {
          super(context, textViewResourceId, mTitleList);
          this.items = mTitleList;
      }
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
          View v = convertView;
          this.position = position;
          if (v == null) {
              LayoutInflater inflater = (LayoutInflater) mContext
                      .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
              v = inflater.inflate(R.layout.applicationlistitem, null);
          }
  
          final ApplicationBean o = (ApplicationBean) items.get(position);
  
          if (o != null) {
  
              txtDescription = (EditText) v
                      .findViewById(R.id.description_text);
  
  
  
              submitButton = (Button) v.findViewById(R.id.submit_btn);
              submitButton.setTag(position);
              submitButton.setOnClickListener(new OnClickListener() {
  
                  @Override
                  public void onClick(View v) {
  
                          PostRequest p = new PostRequest(Integer.parseInt(v
                                  .getTag().toString()));
                          p.execute();
                  }
  
              });
          }
          return v;
      }
  
      @Override
      public int getItemViewType(int position) {
          // TODO Auto-generated method stub
          return position;
      }
  
      @Override
      public int getViewTypeCount() {
          // TODO Auto-generated method stub
          return items.size();
      }
  
  }
  
  
  
  private class PostRequest extends AsyncTask&lt;Void, Void, String&gt; {
      ProgressDialog dlgprogress;
      int position;
  
      public PostRequest(int selectedIndex) {
          position = selectedIndex;
      }
  
      @Override
      protected void onPostExecute(String result) {
          dlgprogress.dismiss();
          final Dialog dlg = new AlertDialog.Builder(mContext)
                  .setTitle("Message")
                  .setMessage(result)
                  .setPositiveButton("Ok",
                          new DialogInterface.OnClickListener() {
                              @Override
                              public void onClick(DialogInterface dialog,
                                      int whichButton) {
                                  dlgprogress.dismiss();
                                  dlgprogress.cancel();
                                  txtDescription.setText("");
                              }
                          }).create();
          dlg.show();
          super.onPostExecute(result);
      }
  
      @Override
      protected void onPreExecute() {
          dlgprogress = ProgressDialog.show(mContext, "", "Please wait");
          // dlgprogress.show(mContext, "", "Please wait");
          super.onPreExecute();
      }
  
      @Override
      protected String doInBackground(Void... arg0) {
          //do something.............
          //..........................
          dlgprogress.dismiss();
          return rsponse;
      }
  
  }
  </code></pre>
  
  <p>applicationlistitem.xml</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical" 
      android:background="#FFFFFF"&gt;
  
  
  
      &lt;LinearLayout
          android:id="@+id/lineatlayout1"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="horizontal" &gt;
  
          &lt;TextView
              android:id="@+id/textView2"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="DESCRIPTION : "
              android:textAppearance="?android:attr/textAppearanceMedium"
              android:textColor="#000000" /&gt;
  
          &lt;EditText
              android:id="@+id/description_text"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:clickable="true"
              android:ems="10"
              android:focusable="true"
              android:focusableInTouchMode="true"
              android:inputType="textMultiLine" 
              android:textColor="#000000"&gt;
          &lt;/EditText&gt;
      &lt;/LinearLayout&gt;
  
      &lt;Button
          android:id="@+id/submit_btn"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="SUBMIT" /&gt;
  
     &lt;/LinearLayout&gt;
  </code></pre>