I have RelativeLayout with RelativeLayout title bar:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical" >
<RelativeLayout android:id="@+id/titleBar"
style="@style/TitleBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true">
<TextView
android:id="@+id/caption"
style="@style/WindowCaption"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="caption"/>
<Button
android:id="@+id/buttonSave"
style="@style/ButtonBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="5dp"
android:onClick="save"
android:text="Save" />
</RelativeLayout>
...
</RelativeLayout>

On a small screens the button gets on top of the text:

I want to resize text, or button to make all of them properly visible.
And I want the text was is on the centre.
Can I do it somehow using only style and layout tools?
Or the only way is to programmatically change the text size?
1 Answer