title: Detect if recycler view items fit the screen
body: <p>I have a chat activity inside it there is a recycler view that display chat message items.</p>
  
  <p>I am confused in deciding the stack orientation of the recycler view, I want the items to show directly from bottom when activity launches, so I do this:</p>
  
  <pre><code>     linear_layout_manager.setStackFromEnd(true);
  </code></pre>
  
  <p>(linear_layout_manager) is the layout manager of my recycler view .</p>
  
  <p><strong>The problem</strong></p>
  
  <p>If I do as I mentioned above then I face a problem when I send the very first message. In which it starts stacking from bottom leaving the above of the recycler view empty.</p>
  
  <p><strong>Why do I need to use stack from end?</strong></p>
  
  <p>you may ask me why not scroll to bottom on activity launch, I will answer you that if I do so then user can visualize the recycler view scrolling to bottom.</p>
  
  <p>But I need to instantly show the last item on activity launch.</p>
  
  <p><strong>My thought</strong></p>
  
  <p>I think that this thought can help, but not sure if it works:</p>
  
  <pre><code>     if(/*items are all fit to screen*/){
           linear_layout_manager.setStackFromEnd(true);
         }else{
           linear_layout_manager.setStackFromEnd(false);
          }
  </code></pre>
  
  <p>Suggestions are appreciated.</p>