Consider the following layout:

```
<LinearLayout
    android:id="@+id/headerLayout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal">

    <ImageView
         android:contentDescription="@string/pipboyImage_contentDescription"
        android:id="@+id/pipboyIcon"
        android:layout_height="40dp"
        android:layout_width="40dp"
        android:src="@drawable/pipboy"/>

    <TextView
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        android:text="@string/title"
        android:textAlignment="center"
        android:textSize="20sp"
        android:textStyle="bold"/>
</LinearLayout>

```

In the sample, I am trying to recreate an interface for a university exercise. The two relevant requirements are that we must use `LinearLayout`, and we must have compatibility for API 15. I am having trouble replicating the exact alignment of the text, and although I have confirmed that what I have so far is acceptable for the teachers definition of precisely replicating the provided interface, it is bugging me that I can't seem to figure out the correct way to align my text.

The text needs to be aligned to the centre. However, this alignment does not appear to acknowledge the image that is placed directly to the left of it. In the example, the text is perfectly aligned to the centre of the screen. In my example, the best I can get is to align the text to the centre of the remaining space after setting up the image.

[![What I have vs What I am trying to do](https://i.stack.imgur.com/a545g.png)](https://i.stack.imgur.com/a545g.png)

I have played around with `android:layout_weight`, eventually resting at a weight of 1 for the image and a weight of 4 for the text. At best, I end up with the same layout I have, now. I have also played around with `android:layout_gravity`, but all I seem to be able to do is move my alignment further away from what I intend.

Doing some research, online, it has been suggested that I use `RelativeLayout`. This is not an option, as the teacher has insisted we only use `LinearLayout`.One student suggested using `android:paddingLeft`. This is definitely an option, but I feel this would not give perfect orientation. It would simply 'mimic' the desired layout in the environment I am testing in. 

I am also concerned about the use of `android:textAlignment="center"`, as this reports support of API 17, and we were specifically told to use support for API 15. Once again, failure to fix this slight misalignment will not lose me marks, so I am not concerned that I am simply not correctly implementing it 'to specification'. That said, the example was provided 'to specification', so I am curious as to how this has been performed using API 15 support and `LinearLayout`.

***How do I align text in a fashion that ignores sibling objects, using only `LinearLayout` and enforcing API 15 compatibility?***