title: how to replace text in listview
body: <p>I need to replace "gold" in Listview</p>
  
  <p>AndroidListView1= "gold" > "goldennnnnnn" AndroidListView2= "gold" > "golderrrrrrrrr"</p>
  
  <p>when i set it in <strong>edittext</strong> then its work!! but when i set it in <strong>List view</strong> then print only 1 item("goldennnnnnn")##
  <strong>this.et3.setText(AndroidListView); (edittext work)</strong> but <strong>this.Listview.setText(AndroidListView1);not work</strong> </p>
  
  <p>this is my code <strong><em>thanks in advance</em></strong></p>
  
  <pre><code>ListView listView ;
  EditText myTextBox,myOuttext,et3;
  Button btn;
  
  ClipboardManager myClipboard;
  private Object adapter;
  
   @Override
   protected void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.activity_main);
       myTextBox = (EditText) findViewById(R.id.editText1);
       myOuttext = (EditText) findViewById(R.id.editText2);
       et3=(EditText)findViewById(R.id.editText3);
       btn=(Button)findViewById(R.id.button1);
       myClipboard = (ClipboardManager)getSystemService(CLIPBOARD_SERVICE);
  
  
       // Get ListView object from xml
       listView = (ListView) findViewById(R.id.listView1);
  
       // Defined Array values to show in ListView
       String[] values = new String[]
               { "AndroidListView1", 
               "AndroidListView2",
               "AndroidListView3",
               "AndroidListView4",
               "AndroidListView5",
               "AndroidListView6",
               "AndroidListView7",
               "AndroidListView8",
               "AndroidListView9",
               "AndroidListView10",
               "AndroidListView11",
               "AndroidListView12",
               "AndroidListView13",
               "AndroidListView14",
               "AndroidListView15",
               "AndroidListView16",
               "AndroidListView17",
  
                                       };
  
       // Define a new Adapter
       // First parameter - Context
       // Second parameter - Layout for the row
       // Third parameter - ID of the TextView to which the data is written
       // Forth - the Array of data
       ArrayList&lt;?&gt; yourlist = new ArrayList&lt;Object&gt;(); 
       ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(this,
         android.R.layout.simple_list_item_1, android.R.id.text1, values);
     listView.setAdapter(adapter);
  
       // Assign adapter to ListView
       listView.setAdapter(new ArrayAdapter&lt;String&gt;(MainActivity.this,
               android.R.layout.simple_list_item_1, values));
  
       // ListView Item Click Listener
       listView.setOnItemClickListener(new OnItemClickListener() {
  
             @Override
             public void onItemClick(AdapterView&lt;?&gt; parent, View view,
                int position, long id) {
  
              // ListView Clicked item index
              int itemPosition     = position;
  
              // ListView Clicked item value
              String  itemValue    = (String) listView.getItemAtPosition(position);
  
               // Show Alert 
               Toast.makeText(getApplicationContext(),
                 "Position :"+itemPosition+"  ListItem : " +itemValue , Toast.LENGTH_LONG)
                 .show();
  
             }
  
        }); 
       myTextBox.addTextChangedListener(new TextWatcher() {
  
             public void afterTextChanged(Editable s) {
             }
  
             public void beforeTextChanged(CharSequence s, int start, 
               int count, int after) {
             }
  
             @SuppressLint("NewApi")
          public void onTextChanged(CharSequence s, int start, 
               int before, int count) {
  
                 MainActivity.this.my1(s);
                 MainActivity.this.AndroidListView(s);
             }
            });
  
  }
   private String my1(CharSequence arg) {
  
          String str = "";
          str = arg.toString().replace(" ", "  " ).replace("gold", "goldennnnnnn");
          this.myOuttext.setText(str);
            System.out.println(str);
          return str;
      }
          private String AndroidListView(CharSequence arg) {
  
      String AndroidListView = "";
      AndroidListView= arg.toString().replace(" ", "").replace("gold", "golderrrrrrrrr");
       this.et3.setText(AndroidListView);
        System.out.println(AndroidListView);
      return AndroidListView;
  }
  </code></pre>
  
  <p>}</p>