title: how to show and hide imageview inside recyclerView
body: <p>I am using for loop, and I have around 20 items displaying in recycler view! Now how do I hide/show image view as for loop runs... Here tts is working fine, but when i try to show/hide using this its not happening..</p>
  
  <p>Presently with below code, once for loops ends the entire imageview is affecting, i want it a row wis(show current(image1) &amp; hide previous imageview(image) )</p>
  
  <p>I am calling this method from main Activity class, but the imageview show or hide not happening</p>
  
  <p>activity</p>
  
  <pre><code> ......
   ...... 
  private void ConvertTextToSpeech() {
      // TODO Auto-generated method stub
     //items.forEach( Multiples obj -&gt;  System.out.println());
      int z=0;
      View holder=null; ImageView imageView=null;ImageView imageView1=null;
      for (Multiples p : items) {
  
          if(z&gt;0){
  
              holder = recyclerView.findViewHolderForAdapterPosition(z).itemView;
              holder.findViewById(R.id.image).setVisibility(View.VISIBLE);
              holder.findViewById(R.id.image1).setVisibility(View.INVISIBLE);
          }
          if(z &lt; items.size()) {
                holder = recyclerView.findViewHolderForAdapterPosition(z).itemView;
                holder.findViewById(R.id.image).setVisibility(View.INVISIBLE);
              holder.findViewById(R.id.image1).setVisibility(View.VISIBLE);
  
          }
          text = p.first + "  " + p.getSecond() + " Za "+p.getResult()+".";
          tts.speak(text, TextToSpeech.QUEUE_ADD, null);
      z++;
      }
  
  }
  </code></pre>
  
  <p>xml</p>
  
  <pre><code>  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"&gt;
  
  
      &lt;com.balysv.materialripple.MaterialRippleLayout
          android:id="@+id/lyt_parent"
          style="@style/RippleStyleBlack"
          android:layout_width="match_parent"
          android:layout_height="?attr/actionBarSize"
          android:focusable="true"&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="vertical"&gt;
  
              &lt;View
                  android:layout_width="match_parent"
                  android:layout_height="1px"
                  android:background="@color/grey_10" /&gt;
  
              &lt;LinearLayout
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:layout_weight="1"
                  android:gravity="center_vertical"
                  android:orientation="horizontal"
                  android:textAlignment="gravity" &gt;
  
                  &lt;View
                      android:layout_width="@dimen/spacing_large"
                      android:layout_height="wrap_content" /&gt;
  
                  &lt;ImageView
                      android:id="@+id/image"
                      android:layout_width="35dp"
                      android:layout_height="35dp"
                      android:background="@android:color/transparent"
                      android:src="@drawable/ic_arrow_right" /&gt;
  
                  &lt;ImageView
                      android:id="@+id/image1"
                      android:layout_width="51dp"
                      android:layout_height="35dp"
                      android:background="@android:color/transparent"
                      android:src="@drawable/ic_arrow_right"
                      android:visibility="invisible" /&gt;
  
                  &lt;LinearLayout
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:orientation="vertical"
                      android:paddingBottom="@dimen/spacing_middle"
                      android:paddingTop="@dimen/spacing_middle"&gt;
  
                      &lt;TextView
                          android:id="@+id/name"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_marginEnd="@dimen/spacing_middle"
                          android:layout_marginRight="@dimen/spacing_middle"
                          android:fontFamily="sans-serif-condensed"
                          android:gravity="center|left"
                          android:text="36"
                          android:textAppearance="@style/TextAppearance.AppCompat.Medium"
                          android:textColor="@color/grey_80"
                          android:textSize="30sp"
  
                          /&gt;
  
  
  
                  &lt;/LinearLayout&gt;
  
  
  
  
  
                  &lt;View
                      android:layout_width="@dimen/spacing_large"
                      android:layout_height="match_parent" /&gt;
  
  
              &lt;/LinearLayout&gt;
  
              &lt;View
                  android:layout_width="match_parent"
                  android:layout_height="1px"
                  android:background="@color/grey_10" /&gt;
  
          &lt;/LinearLayout&gt;
  
      &lt;/com.balysv.materialripple.MaterialRippleLayout&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>adapter</p>
  
  <pre><code>public class AdapterListAnimation extends RecyclerView.Adapter&lt;RecyclerView.ViewHolder&gt; {
  
      private List&lt;Multiples&gt; items = new ArrayList&lt;&gt;();
  
      private Context ctx;
      private OnItemClickListener mOnItemClickListener;
      private int animation_type = 0;
      .........
      ......... 
  </code></pre>