title: Listview Change Item Text color on Button Click
body: <p>I have a list view with custom adapter and when i click on first item  there's button("next) below list view is visible and the first row item text color changes.
  On click of button Next i want to change the next row item text color. Please Help Thank you.</p>
  
  <pre><code>  mainListViews.setOnItemClickListener(new AdapterView.OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView&lt;?&gt; adapterView, View view, int i, long l) {
  
      itemPosition =i;
              String text = textView.getText().toString();
              Toast.makeText(getContext(), "Selected item: " + text + " - " + i, Toast.LENGTH_SHORT).show();
  
              song_namef.setText(text);
  
              playSong(i);
              hello.setVisibility(View.VISIBLE);
  
              setItemNormal();
              View rowView = view;
              setItemSelected(rowView);
  
          }
      });
   public void setItemSelected(View view){
      View rowView = view;
      TextView tv = (TextView)rowView.findViewById(R.id.textView);
      tv.setTextColor(Color.WHITE);
  }
  
  public void setItemNormal()
  {
      for (int i=0; i&lt; mainListViews.getChildCount(); i++)
      {
          View v = mainListViews.getChildAt(i);
          TextView txtview = ((TextView)v.findViewById(R.id.textView));
          txtview.setTextColor(getResources().getColor(R.color.tabsScrollColor));
      }}
  hello.setOnClickListener(new View.OnClickListener() {
  @Override
  public void onClick(View view) {
     Toast.makeText(getContext(),"Next",Toast.LENGTH_SHORT).show();
  
                  itemPosition=itemPosition+1;
  here i want to color next row of item text
  }});
  </code></pre>
  
  <p>getView</p>
  
  <pre><code> public View getView(final int position, View convertView, ViewGroup viewGroup) {
  
           val = position;
          viewHolder = null;
  
          if (convertView == null) {
              viewHolder = new ViewHolder();
              LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  
              convertView = layoutInflater.inflate(R.layout.list_items, viewGroup, false);
  
              // Find the child views.
              viewHolder.country = (TextView) convertView.findViewById(R.id.textView);
              viewHolder.cancel = (ImageView)convertView.findViewById(R.id.button);
  
  
  
              convertView.setTag(viewHolder);
              //  convertView.setTag(vh);
          }
          else {
              viewHolder = (ViewHolder) convertView.getTag();
              //vh = (ViewHolder)vi.getTag();
          }
          String hello = countryList.get(position);
          Log.d("Hello",hello);
  
  
          viewHolder.country.setText(hello.substring(18));
  </code></pre>