title: Transparent background on a activity that uses actionbar
body: <p>Does anyone know how can I make the activity background transparent and show the actionbar(not transparent) at the same time?</p>
  
  <p>I've tried this</p>
  
  <pre><code>    &lt;style name="Theme.PureTransparent" parent="android:Theme"&gt;
          &lt;item name="android:windowIsTranslucent"&gt;true&lt;/item&gt;
          &lt;item name="android:windowBackground"&gt;@android:color/transparent&lt;/item&gt;
          &lt;item name="android:windowContentOverlay"&gt;@null&lt;/item&gt;
          &lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt;
          &lt;item name="android:windowIsFloating"&gt;false&lt;/item&gt;
          &lt;item name="android:backgroundDimEnabled"&gt;false&lt;/item&gt;
      &lt;/style&gt;
  </code></pre>
  
  <p>but I get this error:</p>
  
  <pre><code>java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myapp/com.myapp.activities.SearchTitleStrip}: java.lang.NullPointerException
              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1967)
              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
              at android.app.ActivityThread.access$600(ActivityThread.java:127)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
              at android.os.Handler.dispatchMessage(Handler.java:99)
              at android.os.Looper.loop(Looper.java:137)
              at android.app.ActivityThread.main(ActivityThread.java:4441)
              at java.lang.reflect.Method.invokeNative(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:511)
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
              at dalvik.system.NativeStart.main(Native Method)
       Caused by: java.lang.NullPointerException
              at com.myapp.activities.SearchTitleStrip.setActionbarSearch(SearchTitleStrip.java:80)
              at com.myapp.activities.SearchTitleStrip.onCreate(SearchTitleStrip.java:72)
              at android.app.Activity.performCreate(Activity.java:4465)
              at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931)
              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
              at android.app.ActivityThread.access$600(ActivityThread.java:127)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
              at android.os.Handler.dispatchMessage(Handler.java:99)
              at android.os.Looper.loop(Looper.java:137)
              at android.app.ActivityThread.main(ActivityThread.java:4441)
              at java.lang.reflect.Method.invokeNative(Native Method)
              at java.lang.reflect.Method.invoke
  </code></pre>
  
  <p>Line 80 in SearchTitleStrip class is this code:
  <code>actionBar.setDisplayShowTitleEnabled(false);</code></p>