-1

Noob here, I want to remove the multiple headers(?) of the app(screenshot attached). The blue one came by default, I was able to remove it once but now I am not sure how did it. When I removed the blue one, I made a custom one to my liking. I'd want to know the best practice in this case, and also how to. I want the Logo of the app on the header(app title) along with the name. How can I do that?

Current Screenshot

shashankj
  • 37
  • 1
  • 11

2 Answers2

0

The blue one is actually ActionBar or now you can say Toolbar, and to remove that you add it to your styles.xml file located inside values folder, for e.g :

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
    <item name="windowActionBar">false</item>
    <item name="windowNoTitle">true</item>
</style>
Satyen Udeshi
  • 3,175
  • 1
  • 16
  • 25
  • That seems to be working. Is there a way by which I could add an image to it? Like the one I did with the second/custom Action Bar. I'd also like to change the color of notification bar so I guess using the default ActionBar would be a better choice. – shashankj May 31 '16 at 04:24
  • Yes you can do that, but for that you will have to set a `CustomView` to your `ActionBar` so i would suggest to go with `ToolBar` – Satyen Udeshi May 31 '16 at 04:27
  • Yes. To the ActionBar. I will just delete it. Thanks – shashankj May 31 '16 at 04:30
  • and just FYI, changing **StatusBar** or **NotificationBar** color will be applicable from **API 21** for more info you can see this thread on SO http://stackoverflow.com/questions/22192291/how-to-change-the-status-bar-color-in-android – Satyen Udeshi May 31 '16 at 04:35
  • @ShashankJaiswal did this work for you ? – Satyen Udeshi Jun 01 '16 at 04:24
  • @SatyenUdeshu Yes it did. Thanks. :) – shashankj Sep 13 '16 at 02:44
0

Use android:theme

           <activity
                android:name=".ABC"
                android:label="@string/app_name"               
                android:theme="@android:style/Theme.Black.NoTitleBar" >
            </activity>
D T
  • 2,530
  • 7
  • 30
  • 66