title: Editable ListView Items
body: <p>I want to Edit my <code>ListView</code> items. for example; I have a <code>listView</code> item i clicked this item and I add <code>string value</code> with <code>edit text</code> afterwards I again click this item and I add new <code>string value</code> alongside to previous <code>string value</code>, and again, again, again. When I click this item I want edit this listitem. How I do that?</p>
  
  <p>Java sourcecode:</p>
  
  <pre><code>public class MainActivity extends Activity {
      TextView tvDers;
      EditText etDers, etDersSaati;
      EditText etNot;
      LinearLayout LayoutDers;
      ArrayAdapter&lt;String&gt; adapter;
      ListView list;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          Button btnDersEkle = (Button) findViewById(R.id.btnDersEkle);
  
          list = (ListView) findViewById(R.id.listView1);
          adapter = new ArrayAdapter&lt;String&gt;(MainActivity.this, android.R.layout.simple_list_item_1);
          etDers = new EditText(MainActivity.this);
          //Dialog
          AlertDialog.Builder build = new AlertDialog.Builder(MainActivity.this);
          build.setTitle("Ders Ekle");
          build.setView(etDers);
  
          build.setPositiveButton("Tamam", new DialogInterface.OnClickListener() {
              @Override
              public void onClick(DialogInterface dialog, int which) {
                  adapter.add(etDers.getText().toString());   
              }
          });
          list.setAdapter(adapter);
          final AlertDialog alertDers = build.create();
  
          btnDersEkle.setOnClickListener(new OnClickListener() {
  
              @Override
              public void onClick(View v) {
                  alertDers.show();
  
              }
          });
      }
  
  }
  </code></pre>