title: hide toolbar programmatically with coordinator layout
body: <p>After extensive searching it seems that surprisingly no one is interested in the same behavior. Please point me to the appropriate place if I missed it.</p>
  
  <p>The problem is the following:
  I have a coordinator layout in the main activity xml. Inside of the coordinator layout there is a view pager. Inside two of the three fragments that I put inside the view pager there are recycle views that trigger the hiding of the toolbar in the coordinator layout. The third fragment does not have a recycle view though. The issue is that when the toolbar is shown the third fragment is drawn lower than it should, hiding part of the ui below the bottom edge of the screen. If the toolbar is hidden everything is shown normally. </p>
  
  <p>So the question is - how can I hide the toolbar programmatically? e.g. when the user swipes to the third fragment in the view pager?</p>
  
  <p>If you think there is a better approach - I would be also glad to hear that. Thanks! </p>