title: Thousands separator formatting with Databinding
body: <p>I have a ViewModel that looks like this: </p>
  
  <pre><code>public class OrderViewModel {
      double price = 23748.89;
  }
  </code></pre>
  
  <p>and a layout that I bind the OrderViewModel to: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;layout xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  
      &lt;data&gt;
  
          &lt;variable
              name="order"
              type="com.example.viewmodel.OrderViewModel"/&gt;
  
      &lt;/data&gt;
  
      &lt;LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="match_parent"
          android:orientation="horizontal"&gt;
  
  
          &lt;TextView
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:text="@{@string/price_format(order.price)}"/&gt;
  
      &lt;/LinearLayout&gt;
  
  &lt;/layout&gt;
  </code></pre>
  
  <p>The formatting string that is used looks like this: </p>
  
  <pre><code>&lt;string name="price_format"&gt;%+.2f $&lt;/string&gt;
  </code></pre>
  
  <p>which nicely adds the <code>$</code> sign and reduces the float representation to 2 decimals. </p>
  
  <p>Outcome looks like </p>
  
  <blockquote>
    <p>1234.89</p>
  </blockquote>
  
  <p>Now I want to replace the decimal point with a comma and add a thousands separator, making my price look like</p>
  
  <blockquote>
    <p>1.234,89</p>
  </blockquote>
  
  <p>Can I do this solely with my XML formatting string or do I have to do the formatting in the java code (my ViewModel)?</p>