How to increase the size of the title bar attached to the top of any screen in android
2 Answers
EDIT:
this solution was for API < 11 ... now we have ActionBars
EDIT: first i answer this
Create custom titlebar in Android
EDIT: I'm adding this because I think Sujit gave the wrong answer.
To increase the size of the title bar you will need to add file with this content to res/values
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="CustomTheme" parent="android:Theme">
<item name="android:windowTitleSize">50dip</item>
</style>
</resources>
in AndroidManifest.xml
file
<activity android:theme="@style/CustomTheme" android:name=".Activity" android:label="AppName">
...
</activity>
-
Have you gone through the link that you have mention here?? If yes then this is what i have also written that you have to create your custom title bar. First try to read whatever are copying and pasting....– SujitCommented Jun 9, 2011 at 10:35
-
yes i did ... you wrote how to build "custom bar" by dissabling real one and make a fake one in Layout ... this link provide information how to build real custom bar in "android way"– SelvinCommented Jun 9, 2011 at 10:46
-
1@Selvin Ok what so special about your this CustomWindow, what if I create a base Activity using Sujit procedure and extend all activities of my app with that base activity is not that code reusability, then I must say you should write a book on design pattern, its easy to critic on one rather than admiring Commented Jun 10, 2011 at 9:34
-
1"This is android title bar and you can not increase its size." <= yeah sure this is correct answer :)– SelvinCommented Jun 10, 2011 at 10:58
-
8Eh... this answer is the RIGHT one. The one before this was kinda useless to me... Upgrade this one please folks. It's actually helpful. Commented Jul 17, 2011 at 5:52
This is android title bar and you can not increase its size. It you need this feature in your application then you can create a custom title bar.
Remove the this default Title bar by using this code in your activity..
getWindow().requestFeature(Window.FEATURE_NO_TITLE);
or this in your manifast inside your activity tag.
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
and then create a custom title bar in your XML file.
-
4it's not true ... this answer is wrong ... disabling title bar and making own in activity layout it's not a real solution– SelvinCommented Jun 9, 2011 at 10:27
-