title: Change background color of RecyclerView corresponding to specific item in list when it is not loaded
body: <p>I have a RecyclerView in my activity that displays a bunch of items in a list. I have a small control panel that changes the background color of the items in that list. I want scroll the absolute first item in the list (not the first <em>visible</em> item in the list) and change its background color as well. When I use <code>scrollToPosition(0)</code> though, it doesn't scroll and when I attempt to change the color of the first item in the list, it's not loaded and so I get null. Here's my code:</p>
  
  <pre><code>@Override
      public void onClick(View v) {
          int currentRound = currentEncounter.getCurrentRound();
          int oldIndex = currentEncounter.getCurrentTurnIndex();
  
      switch (v.getId()) {
          case R.id.encounter_activity_next_turn_button:
              int idx = currentEncounter.getCurrentTurnIndex();
              participantsLayoutManager.scrollToPositionWithOffset(idx, 160);
              participantsLayoutManager.findViewByPosition(currentEncounter.getCurrentTurnIndex()).setBackgroundColor(Color.WHITE);
  
              currentEncounter.nextTurn();
  
              if(currentRound != currentEncounter.getCurrentRound()) {
                  ((TextView) findViewById(R.id.encounter_activity_current_round_text_view)).setText(Integer.toString(currentEncounter.getCurrentRound()));
                    participantsLayoutManager.scrollToPositionWithOffset(1, 160);
                      participantsLayoutManager.scrollToPositionWithOffset(0, 0);
                      Log.d(LOG_RECYCLE_VIEW, "Should have scrolled to top");
                  } else
                      participantsLayoutManager.scrollToPositionWithOffset(currentEncounter.getCurrentTurnIndex(), 160);
                 participantsLayoutManager.findViewByPosition(currentEncounter.getCurrentTurnIndex()).setBackgroundColor(Color.RED);
                 participantAdapter.setCurrentCreatureIndex(currentEncounter.getCurrentTurnIndex());
  
              break;
      }
  }
  </code></pre>
  
  <p>Is there a better way to do this?</p>