title: 2 way data binding error for a livedata variable with proper xml binding
body: <p>I have a loginViewModel for my login Activity, in activity_login.xml</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"
      xmlns:tools="http://schemas.android.com/tools"&gt;
  
      &lt;data&gt;
          &lt;variable
              name="loginViewModel"
              type="com.example.test.ui.login.LoginViewModel" /&gt;
      &lt;/data&gt;
  
      &lt;androidx.constraintlayout.widget.ConstraintLayout
          android:id="@+id/login_layout"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical"&gt;
  
          &lt;EditText
              android:id="@+id/mobile_number"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:editable="true"
              android:ems="10"
              android:hint="@string/mobile_number_string"
              android:inputType="phone"
              android:textAlignment="center"
              android:text="@={loginViewModel.phoneNumber}"
              app:layout_constraintBottom_toTopOf="@+id/otp_input"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintTop_toTopOf="parent" /&gt;
      &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  &lt;/layout&gt;
  </code></pre>
  
  <p>And in my loginViewModel i have defined my livedata as </p>
  
  <pre><code>class LoginViewModel : ViewModel(){
      private val _phoneNumber = MutableLiveData&lt;String&gt;()
      val phoneNumber : LiveData&lt;String&gt;
          get() = _phoneNumber
  }
  </code></pre>
  
  <p>Now, while building I am getting the following error</p>
  
  <pre><code>The expression \u0027loginViewModelPhoneNumber.getValue()\u0027 cannot be inverted, so it cannot be used in a two-way binding\n\nDetails: There is no inverse for method getValue, you must add an @InverseMethod annotation to the method to indicate which method should be used when using it in two-way binding expressions
  </code></pre>
  
  <p>All articles that I am reading suggesting this way to implement.
  Can someone tell me what am I doing wrong here? </p>