Q:

Android RelativeLayout Button above TextView

have 2 text views 1 next to another (using layout_toLeftOf attribute) and I'm trying to place a button above each one of the text views:
1) if I'm using above, alignLeft and alignRight attributes on the button, the button width and height enlarges to fit the size of the text views 
2) so I thought of using linear layout so it will fit to the size of the textview , and then place a button with layout_gravity="center", but it's not centered, it's aligned to the left. 
Here is the code(its all inside a RelativeLayout):
    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_above="@id/countdown_hours_tv"
        android:layout_alignLeft="@id/countdown_hours_tv"
        android:layout_alignRight="@id/countdown_hours_tv">

        <Button
            android:layout_width="@dimen/plus_minus_button_size"
            android:layout_height="@dimen/plus_minus_button_size"
            android:layout_gravity="center"
            android:background="@drawable/plus_sign_button"
            android:onClick="increaseHourClicked"/>

    </LinearLayout>

    <Button
        android:layout_width="@dimen/plus_minus_button_size"
        android:layout_height="@dimen/plus_minus_button_size"
        android:layout_below="@id/countdown_hours_tv"
        android:layout_alignLeft="@id/countdown_hours_tv"
        android:layout_alignRight="@id/countdown_hours_tv"
        android:background="@drawable/minus_sign_button"
        android:onClick="decreaseHourClicked"/>

A:

Try adding the Button and the TextView inside a LinearLayout with vertical orientation.  Something like this:
<RelativeLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:id="@+id/layout1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Button1"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="TextView1"
            android:layout_gravity="center"/>
    </LinearLayout>

    <LinearLayout
        android:id="@+id/layout2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_toRightOf="@id/layout1"
        android:orientation="vertical">

        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Button1"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="TextView1"
            android:layout_gravity="center"/>
    </LinearLayout>

</RelativeLayout>

