how to replace display array list equals another array list values

I would use an OnItemClickListener to handle the user choice.

yourFirstList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
      @Override
      public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {  
          //the index from your first list is i
          String newValue = second[i];
          yourTextView.setText(newValue);
      }
});

Leave a Comment