package mozilla.org.webmaker.activity;

import android.app.ActionBar;
import android.content.res.Resources;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

import mozilla.org.webmaker.R;
import mozilla.org.webmaker.WebmakerActivity;

public class Tinker extends WebmakerActivity {
    public Tinker() {
        super("tinker", R.id.tinker_layout, R.layout.tinker_layout, R.menu.menu_tinker);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // Custom styles
        Resources res = getResources();
        ColorDrawable plum = new ColorDrawable(getResources().getColor(R.color.plum));
        int shadowPlum = res.getColor(R.color.shadow_plum);

        ActionBar actionBar = getActionBar();
        actionBar.setBackgroundDrawable(plum);

        Window window = getWindow();
        window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
        window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
        window.setStatusBarColor(shadowPlum);
    }
}

@@ -145,24 +145,49 @@
 orDrawable;%0A
+import android.os.Build;%0A
 import andro
@@ -619,24 +619,97 @@
 nceState);%0A%0A
+        if (Build.VERSION.SDK_INT %3E= Build.VERSION_CODES.LOLLIPOP) %7B%0A    
         // C
@@ -721,16 +721,20 @@
  styles%0A
+    
         
@@ -773,16 +773,20 @@
         
+   
+ 
 ColorDra
@@ -864,16 +864,20 @@
         
+    
 int shad
@@ -913,32 +913,36 @@
 .shadow_plum);%0A%0A
+    
         ActionBa
@@ -978,16 +978,43 @@
 %0A       
+     if (actionBar != null)
  actionB
@@ -1054,16 +1054,20 @@
         
+    
 Window w
@@ -1083,24 +1083,28 @@
 etWindow();%0A
+    
         wind
@@ -1182,24 +1182,28 @@
 S);%0A        
+ 
+   
 window.clear
@@ -1265,24 +1265,28 @@
 S);%0A        
+    
 window.setSt
@@ -1311,16 +1311,26 @@
 wPlum);%0A
+        %7D%0A
     %7D%0A%7D%0A

Fix possible compatibility issue on older SDK versions