Search code examples
androidandroid-studioandroid-actionbarandroid-themeandroid-styles

Android studio preview pane not rendering ActionBar?


I'm running the latest version of android studio ,Problem is the preview pane does not render the ActionBar when any of the AppCompat themes are used, if i change the theme of the preview pane it works fine(Not change actual theme) ,but is there any discepency in doing this,

my styles.xml is as follows

<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
    </style>

</resources>

when the preview pane is set to AppTheme ,the ActionBar ain't shown ,however it works fine in my device and AVD,

No Action Bar shown

As you can see this makes it hard to debug and test the ActionBar

Please suggest some fix to this and how exactly does a AppCompat theme differ from an ordinary one?,I'm just an android beginner .

Thanks!


Solution

  • It is a bug: https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=78944

    Unfortunately it is low priority.

    Update: set the preview to API 22