title: Recyclerview cannot get last child Android (getChildAt(pos)) Adapter items > RecyclerView children
body: <p>I have a several recyclerviews (added programatically), I am testing the first recyclerview for onKeyUp event.  thir rv has an adapter with 7 items, but the rv has only 6 children when I call rv.getChildCount().  but on screen I can see 7 items (only full 5 at a time), so whats wrong with recyclerview?</p>
  
  <p>I just want to set a drawable background when the user press some keys for navigate in the recyclerviews.</p>
  
  <pre><code>    @Override
  public boolean onKeyUp(int keyCode, KeyEvent event) {
      int pos=Integer.parseInt(PosListon.get(ListonCur));
      int cant=Integer.parseInt(CantInListon.get(ListonCur));
      if(keyCode == KeyEvent.KEYCODE_A) { //right
        if(pos&lt;cant-1) {
            RecyclerView rv =(RecyclerView) llmain.getChildAt(ListonCur);
            rv.smoothScrollToPosition(pos+1);
  
            int caadp=rv.getAdapter().getItemsCount();//this shows 7
            int ca=  rv.getChildCount();//this shows 6
  
            RelativeLayout rl=(RelativeLayout) rv.getChildAt(pos+1);//this is null whene index (pos+1) is 6
     rl.setBackground(getResources().getDrawable(R.drawable.border_selected)); //if rl is null then here is an exception
            pos++;
  
                    PosListon.set(ListonCur, pos + "");//record pos in List
  
            return true;
  
  
        }}
  
      }
  </code></pre>
  
  <p>I know this may be associated whit the items currently presented on screen but I need help on how to haldle it.</p>