title: Android : Align a text at left and center the textview in his parents view
body: <p>Hello i'm facing a little problem</p>
  
  <p>I'm using GRAVITY LEFT to make my text an aligment for the left side of a view but I want to center inside the textview but also align on the left part</p>
  
  <p><strong>Here's what I have now:</strong></p>
  
  <pre><code>            ___________________________________
  _ _ _ _ _ _| aaaaaaaaaaaaa                     |_ _ _ _ _ _
  _ _ _ _ _ _| aaaaaaaa                          |_ _ _ _ _ _
  _ _ _ _ _ _| aaaaaaaaaaaaaa                    |_ _ _ _ _ _
              -----------------------------------
  </code></pre>
  
  <p><strong>What I want is:</strong></p>
  
  <pre><code>            ___________________________________
  _ _ _ _ _ _|           aaaaaaaaaaa             |_ _ _ _ _ _
  _ _ _ _ _ _|           aaaaaaaa                |_ _ _ _ _ _
  _ _ _ _ _ _|           aaaaaaaaaaaaaa          |_ _ _ _ _ _
              -----------------------------------
  </code></pre>
  
  <p><strong>Where:</strong></p>
  
  <p>_ _ _ _ = outside of textview</p>
  
  <p>| = the TextView edge</p>
  
  <p>I tried android:gravity = "left|center" but it doesn't work, any idea ?</p>
  
  <p>Thanks</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                  xmlns:app="http://schemas.android.com/apk/res-auto"
                  android:id="@+id/image_button_wrapper"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:gravity="center"
                  android:layout_centerVertical="true"&gt;
  
      &lt;ImageView
          android:id="@+id/left_button_image"
          android:layout_centerVertical="true"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginRight="@dimen/spacing_normal"/&gt;
  
      &lt;Textview
          android:id="@+id/textview"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_toRightOf="@id/left_button_image"
          android:gravity = "center|left|left"
          android:clickable="false"
          android:focusable="false"
          app:font_name="Roboto-Light.ttf"/&gt;
  </code></pre>
  
  <p>What i've (text align left but not centered)<a href="https://i.stack.imgur.com/smEC5.png" rel="noreferrer"><img src="https://i.stack.imgur.com/smEC5.png" alt="enter image description here"></a></p>
  
  <p>What i want (text align left and centered) (I add a padding manually to get the render but it's dirty and will not adapt to all text) : <a href="https://i.stack.imgur.com/V0QYO.png" rel="noreferrer"><img src="https://i.stack.imgur.com/V0QYO.png" alt="enter image description here"></a></p>