I found that none of the answers work exactly as the OP intended, but the RelativeLayout solution was the closest. Except that the TextView was not centered. But, with layout_centerInParent = true, it works like a charm:
<RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:id="@+id/TextView00" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#FFFFFF" android:textSize="20px" android:textStyle="bold" android:text="Something" android:layout_centerInParent="true" /> <Button android:id="@+id/btnCalls" android:drawableLeft="@drawable/icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true"/> </RelativeLayout>
source share