title: MVVM Set Cursor in end of text in EditText when using afterTextChanged fuction
body: <p>my problem is when my edit text add comma cursor will move to first of text how to set the cursor always in the end of edit text when using ObservableField and mvvm this is my xml</p>
  
  <pre><code>&lt;EditText
      android:id="@+id/input_amount"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:hint="@string/hint_amount"
      android:inputType="number"
      android:maxLines="1"
      android:text="@={viewmodel.amount}"
      android:afterTextChanged="@{viewmodel.afterTextChanged}"/&gt;
  </code></pre>
  
  <p>this is my view model</p>
  
  <pre><code>var amount = ObservableField&lt;String&gt;()
  fun afterTextChanged(editable: Editable){
      var longValue : Long
      var originalText = editable.toString()
      if(originalText.isNullOrEmpty())
          return
  
      longValue = originalText.convertCurrencyToLong()
      amount.set(longValue.convertToCurrency())
  }
  </code></pre>
  
  <p>this is my helper</p>
  
  <pre><code>object CurrencyHelper{
     const val SIMPLE_CURRENCY_SPLIT = ","
     const val SIMPLE_CURRENCY_STRING = "#,###"
  
     @JvmField val SIMPLE_CURRENCY_FORMAT = object : ThreadLocal&lt;NumberFormat&gt;(){
         override fun initialValue(): NumberFormat {
             return DecimalFormat(SIMPLE_CURRENCY_STRING)
         }
     }
  }
  
  fun Long.convertToCurrency(): String = CurrencyHelper.SIMPLE_CURRENCY_FORMAT.get().format(this)
  
  fun String.convertCurrencyToLong() : Long = this.replace(CurrencyHelper.SIMPLE_CURRENCY_SPLIT.toRegex(), "").toLong()
  </code></pre>