title: OnComplete action for button in recyclerview only applied to first position
body: <p>I have a activity where it displays candidate on recyclerview to cardview. All is functioning correctly except the code below greyed the button for only the first position. I will attach the screenshot below.</p>
  <p><a href="https://i.stack.imgur.com/DLd43.png" rel="nofollow noreferrer">the output</a></p>
  <p>it should be if only one field value is true on in all documents, all the button should be disabled. But as you can see, only the first button is disabled.</p>
  <p>Here is my code:</p>
  <pre><code>db.collection(&quot;cancol&quot;).whereEqualTo(currentuser, true).get().addOnCompleteListener(new OnCompleteListener&lt;QuerySnapshot&gt;() {
          @Override
          public void onComplete(@NonNull Task&lt;QuerySnapshot&gt; task) {
              Button btncan= findViewById(R.id.btncandidate);
              Toast.makeText(NewVoteMainActivity.this, &quot;You have already used your vote.&quot;, Toast.LENGTH_SHORT).show();
              adapter.setOnItemClickListener(null);
              int disabled = Color.parseColor(&quot;#c2c2c2&quot;);
              btncan.setBackgroundColor(disabled);
          }
      });
  </code></pre>
  <p>I also tried this but also gives the same result:</p>
  <pre><code>db.collection(&quot;cancol&quot;).get().addOnCompleteListener(new OnCompleteListener&lt;QuerySnapshot&gt;() {
              @Override
              public void onComplete(@NonNull Task&lt;QuerySnapshot&gt; task) {
                  if (task.isSuccessful()) {
  
                      Toast.makeText(NewVoteMainActivity.this, &quot;Retrieving Documents...&quot; , Toast.LENGTH_SHORT).show();
                      List&lt;String&gt; list = new ArrayList&lt;&gt;();
                      for (QueryDocumentSnapshot document : task.getResult()) {
                      
                          if (document.getBoolean(currentuser) == true) {
  
                              Button btncan= findViewById(R.id.btncandidate);
                              Toast.makeText(NewVoteMainActivity.this, &quot;You have already used your vote.&quot;, Toast.LENGTH_SHORT).show();
                              adapter.setOnItemClickListener(null);
                              int disabled = Color.parseColor(&quot;#c2c2c2&quot;);
                              btncan.setBackgroundColor(disabled);
  
                          }
                      }
  </code></pre>
  <p>How do I make the code apply to every button?</p>