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?
-
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 Answers
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.

- 1,058
- 2
- 10
- 18
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

- 90,003
- 9
- 87
- 127
possible Solutions
To place your own design instead of grey bar you can create your custom title bar. see the example here
Or you can remove the title bar using the following in manifest
android:theme="@android:style/Theme.NoTitleBar"
If you wan to show the title over the image you can simply use a FrameLayout where put a textview over Image.

- 54,068
- 14
- 92
- 112
-
many thanks. I have not tested the code but it seems correct. How come the download extension is `rar` as opposed to zip so I could add it to eclipse and play with it? – learner Apr 17 '13 at 07:21
-
-