Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to increase the size of the title bar in an Android application?

Tags:

android

How to increase the size of the title bar attached to the top of any screen in android

like image 769
Sando Avatar asked Jun 03 '11 11:06

Sando


Video Answer


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>
like image 102
Selvin Avatar answered Oct 03 '22 20:10

Selvin


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.

like image 44
Sujit Avatar answered Oct 03 '22 19:10

Sujit