title: Kotlin CustomView 2-way databinding
body: <p>I have 1 custom view that contains : TextView -> label ; EditText -> input ; TextView -> error message</p>
  
  <p>I set the desired text on my EditText from my custom view using custom attribute</p>
  
  <p>My binding adapter look like : </p>
  
  <pre><code>@InverseBindingMethods(InverseBindingMethod(type = CustImp::class,attribute = "customtext"))
  class BindingAdapters {
      companion object {
          @JvmStatic
          @BindingAdapter("customtext")
          fun settextulmeui(editText: CustImp, text: String?) {
              text?.let {
                  if (it != editText.nInput.text.toString()) {
                      editText.nInput.setText(it)
                  }
              }
          }
  
          @JvmStatic
          @BindingAdapter(value = ["customtextAttrChanged"], requireAll = false)
          fun setListener(editText: CustImp, listener: InverseBindingListener?) {
              if (listener != null) {
                  editText.nInput.addTextChangedListener(object : TextWatcher {
                      override fun beforeTextChanged(charSequence: CharSequence, i: Int, i1: Int, i2: Int) {
  
                      }
  
                      override fun onTextChanged(charSequence: CharSequence, i: Int, i1: Int, i2: Int) {
  
                      }
  
                      override fun afterTextChanged(editable: Editable) {
                          listener.onChange()
                      }
                  })
              }
          }
  
          @JvmStatic
          @InverseBindingAdapter(attribute = "customtext")
          fun gettextulmeui(nMe: CustImp): String {
              return nMe.nInput.text.toString()
          }
      }
  }
  </code></pre>
  
  <p>using in my layout like :</p>
  
  <pre><code>    &lt;CustImp
          android:id="@+id/mTest"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          app:customtext="@={login.mytext}"
                /&gt;
  </code></pre>
  
  <p>Using my observablefield "mytext" i can pre-populate my edittext from my customview. I can get any new value that was typed if i hit a submit button ( get the new value using my observablefield in my view model )</p>
  
  <p>But : if i rotate the screen i lose all data; </p>
  
  <p>Any help/clue? 
  Thanks</p>