title: How to set layout_gravity with databinding
body: <p>I'm trying to set <code>layout_gravity</code> to a LinearLayout using data binding.<br>
  This is my layout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;layout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"&gt;
  
      &lt;data&gt;
  
          &lt;import type="android.view.Gravity" /&gt;
  
          &lt;variable
              name="viewModel"
              type="com.example.viewModel.MessageViewModel" /&gt;
      &lt;/data&gt;
  
      &lt;LinearLayout
          android:id="@+id/messageAdapter_layout"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="horizontal"&gt;
  
          &lt;LinearLayout
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="@{viewModel.isReceived ? Gravity.START : Gravity.END}"
              android:orientation="vertical"
              app:setBackground="@{viewModel.isReceived}"&gt;
  
              &lt;TextView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="@{viewModel.content}"
                  android:textColor="@color/primaryTextColorInv" /&gt;
  
              &lt;TextView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginTop="5dp"
                  android:textAppearance="?android:textAppearanceSmall"
                  android:textColor="@color/secondaryTextColorInv"
                  android:textStyle="italic" /&gt;
          &lt;/LinearLayout&gt;
      &lt;/LinearLayout&gt;
  &lt;/layout&gt;
  </code></pre>
  
  <p>The nested LinearLayout should be aligned to START when <code>viewModel.isReceived</code> is <code>true</code> and to END when <code>viewModel.isReceived</code> is <code>false</code> but I got this error:</p>
  
  <pre><code>Found data binding errors.
  ****/ data binding error ****msg:Cannot find the setter for attribute 'android:layout_gravity' with parameter type int on android.widget.LinearLayout.
  </code></pre>
  
  <p>Is possible to do this without using a <code>@BindingAdapter</code>?</p>