title: Need help in Android Studio: Text alignment
body: <p>I have set 
      <code>android:gravity="right"</code>
  to align my text to the right. 
  However, when the length of the string exceeds the space, the following text can't be seen. </p>
  
  <p>How can I solve this, so that the previous entry will move leftwards?</p>
  
  <p>It appears that the problem of my code comes from <code>EditText.append()</code>, when I append the new input from the OnClickListener, the text would behave the way keyboard input does. </p>
  
  <p>May you guide me how to solve it? Sorry I am new to Android</p>
  
  <pre><code>&lt;EditText
      android:id="@+id/equation"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_marginEnd="16dp"
      android:layout_marginLeft="16dp"
      android:layout_marginRight="16dp"
      android:layout_marginStart="16dp"
      android:layout_marginTop="40dp"
      android:ems="10"
      android:focusable="false"
      android:focusableInTouchMode="false"
      android:inputType="numberSigned|numberDecimal"
      app:layout_constraintLeft_toLeftOf="parent"
      app:layout_constraintRight_toRightOf="parent"
      app:layout_constraintTop_toTopOf="parent"
      android:clickable="false"
      android:gravity="right"
      android:layout_gravity="end"/&gt;
  </code></pre>
  
  <p>// Image</p>
  
  <p>The Edit text widget is right aligned.</p>
  
  <p><img src="https://i.stack.imgur.com/bbHjE.jpg" alt=""></p>
  
  <p>When the length of the string exceeds the space, the new entry can't be seen.
  <img src="https://i.stack.imgur.com/xbAT6.jpg" alt=""></p>
  
  <p>How to change it so that the old entry move leftwards, and the new entry will continue appear at the right end of the edit text widget?</p>
  
  <p><img src="https://i.stack.imgur.com/Hhf3x.jpg" alt=""></p>