0

How do I get rid of the gray background in the image below? I am referring to the background appearing behind the title "MergeLayout". Basically I want to set my own background there, like a header background. Also is there a way to set a footer background? If not can I at least stretch the bridge image to fill the entire screen?

enter image description here

learner
  • 11,490
  • 26
  • 97
  • 169
  • post your layout file (xml) – Triode Apr 17 '13 at 06:02
  • Possible duplicate of this question http://stackoverflow.com/questions/2251714/set-title-background-color. and which footer are you referring to. Post some code which you have used to achive above. – jaga Apr 17 '13 at 06:04

3 Answers3

2

In the androidmanifest.xml you probably have a style selected.

<application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >

Find the style in res/values/

Styles.xml

<resources>

    <style name="AppTheme" parent="android:Theme.Black.NoTitleBar" />

</resources>

This will get rid of it throughout the app. No need to rewrite code over and over.

Chris Stryker
  • 1,058
  • 2
  • 10
  • 18
1

That bar is the title bar. Add

requestWindowFeature(Window.FEATURE_NO_TITLE);

in onCreate before setContentView to get rid of it.

You can set a footer by putting something at the bottom of your xml. Make your main layout a RelativeLayout, make your background image fill_parent in height, and make it layout_above your footer, and make your footer layou_alignParentBottom=true

Gabe Sechan
  • 90,003
  • 9
  • 87
  • 127
0

possible Solutions

  1. To place your own design instead of grey bar you can create your custom title bar. see the example here

  2. Or you can remove the title bar using the following in manifest

               android:theme="@android:style/Theme.NoTitleBar"
    
  3. If you wan to show the title over the image you can simply use a FrameLayout where put a textview over Image.

stinepike
  • 54,068
  • 14
  • 92
  • 112