|  | @@ -7,6 +7,7 @@ import android.content.res.Resources;
 | 
	
		
			
			| 7 | 7 |  import android.graphics.drawable.Drawable;
 | 
	
		
			
			| 8 | 8 |  import android.os.AsyncTask;
 | 
	
		
			
			| 9 | 9 |  import android.support.annotation.ColorInt;
 | 
	
		
			
			|  | 10 | +import android.support.annotation.NonNull;
 | 
	
		
			
			| 10 | 11 |  import android.support.annotation.UiThread;
 | 
	
		
			
			| 11 | 12 |  import android.support.v4.content.ContextCompat;
 | 
	
		
			
			| 12 | 13 |  import android.support.v4.content.res.ResourcesCompat;
 | 
	
	
		
			
			|  | @@ -111,14 +112,14 @@ public class RnnToolBar extends Toolbar {
 | 
	
		
			
			| 111 | 112 |      }
 | 
	
		
			
			| 112 | 113 |  
 | 
	
		
			
			| 113 | 114 |      private void showToolbar() {
 | 
	
		
			
			| 114 |  | -        ActionBar actionBar = ContextProvider.getActivityContext().getSupportActionBar();
 | 
	
		
			
			|  | 115 | +        ActionBar actionBar = ((AppCompatActivity) getContext()).getSupportActionBar();
 | 
	
		
			
			| 115 | 116 |          if (actionBar != null) {
 | 
	
		
			
			| 116 | 117 |              actionBar.show();
 | 
	
		
			
			| 117 | 118 |          }
 | 
	
		
			
			| 118 | 119 |      }
 | 
	
		
			
			| 119 | 120 |  
 | 
	
		
			
			| 120 | 121 |      private void hideToolbar() {
 | 
	
		
			
			| 121 |  | -        ActionBar actionBar = ContextProvider.getActivityContext().getSupportActionBar();
 | 
	
		
			
			|  | 122 | +        ActionBar actionBar = ((AppCompatActivity) getContext()).getSupportActionBar();
 | 
	
		
			
			| 122 | 123 |          if (actionBar != null) {
 | 
	
		
			
			| 123 | 124 |              actionBar.hide();
 | 
	
		
			
			| 124 | 125 |          }
 | 
	
	
		
			
			|  | @@ -161,7 +162,7 @@ public class RnnToolBar extends Toolbar {
 | 
	
		
			
			| 161 | 162 |       * @param screen The currently displayed screen
 | 
	
		
			
			| 162 | 163 |       */
 | 
	
		
			
			| 163 | 164 |      @UiThread
 | 
	
		
			
			| 164 |  | -    public void update(Screen screen) {
 | 
	
		
			
			|  | 165 | +    public void update(@NonNull Screen screen) {
 | 
	
		
			
			| 165 | 166 |          ((AppCompatActivity) getContext()).setSupportActionBar(this);
 | 
	
		
			
			| 166 | 167 |          setTitle(screen.title);
 | 
	
		
			
			| 167 | 168 |          setStyle(screen);
 |