Search code examples
androidandroid-studioandroid-actionbar

Action bar not visible in Android Studio


I used a custom toolbar in one of my activities by setting the theme of that activity to No Action Bar in the Android Manifest file.

<activity android:name=".ChatLogActivity"
              android:theme="@style/Theme.AppCompat.Light.NoActionBar"
              android:windowSoftInputMode="adjustResize"
    >

But now rest all the activities are showing no action bar in the Android Studio at the time of designing which is making the whole designing process cumbersome. However, the action bar is showing up in the phone in all those activities. I tried doing "Invalidate cache and restart" but the problem still persists. I can't understand why is it happening.

Screenshots
enter image description here

enter image description here

EDIT 1: Theme is already set to Dark action bar in the design tab
enter image description here

P.S: I know the UI is an eyesore


Solution

  • Is this only in the preview? If so, just turn on 'Show Layout Decorations' in the preview tab of your layout file.

    Android Studio v3.4.1 enter image description here