I have created custom titlebar with my own layout to it. I would like to have displayed text in title bar aligned to horizontal center (= the same as default titlebar). But this is not working for me, my text is still alligned to the top of fitlebar, not to the centre. Could you give me some advice?
I am using this code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@drawable/top_back">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/title"
android:layout_gravity="center_vertical"
android:paddingLeft="15dip"
/>
</LinearLayout>