title: Data binding returning null
body: <p>I might be doing this all wrong, but I have the same exact implementation in another fragment/viewmodel with no problems. Maybe because it's a dialog? Every time I log message or message.messagebody it returns null. Can anyone maybe point out why? Currently learning mvvm.</p>
  
  <p>xml: (the important bit since it's long)</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="user"
              type="com.catbellystudio.knodee.models.Users" /&gt;
  
          &lt;variable
              name="vm"
              type="com.catbellystudio.knodee.ui.profile.ProfileViewModel" /&gt;
  
      &lt;/data&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="400dp"
          android:layout_margin="10dp"
          android:background="@drawable/custom_background_popup"
          android:elevation="10dp"
          android:orientation="vertical"&gt;
  
                  &lt;ScrollView
                      android:id="@+id/popupTextLayout"
                      android:layout_width="match_parent"
                      android:layout_height="277dp"
                      android:layout_marginTop="8dp"&gt;
  
                      &lt;EditText
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content"
                          android:background="@color/colorPrimary"
                          android:hint="@string/your_message"
                          android:inputType="textMultiLine"
                          android:padding="10dp"
                          android:text="@{vm.message.messageBody}" /&gt;
                  &lt;/ScrollView&gt;
      &lt;/LinearLayout&gt;
  &lt;/layout&gt;
  </code></pre>
  
  <p>viewmodel: </p>
  
  <pre><code>class ProfileViewModel(
  private val userRepository: UserRepository,
  private val messageRepository: MessageRepository
  ) : ViewModel() {
  
  var message: Message = Message()
  var sender: Users? = null
  var receiver: Users? = null
  var string:String?=null
  
  fun getLoggedInUser() = runBlocking { userRepository.getUser() }
  
  fun onBackPressed(view: View) {
      Navigation.findNavController(view).navigateUp()
  }
  
  fun postMessage(view:View) {
      Coroutines.main {
          Log.e("messagevm", message.toString())
      }
  }
  }
  </code></pre>
  
  <p>fragment:</p>
  
  <pre><code>class MessageFragment : Fragment(), KodeinAware {
  
  private lateinit var viewModel: ProfileViewModel
  private lateinit var profileBinding: FragmentProfileBinding
  private lateinit var popupBinding: FragmentPopupBinding
  override val kodein by kodein()
  private val factory: ProfileViewModelFactory by instance()
  
  private lateinit var dialog: Dialog
  
  override fun onCreateView(
      inflater: LayoutInflater, container: ViewGroup?,
      savedInstanceState: Bundle?
  ): View? {
      viewModel = ViewModelProviders.of(this, factory).get(ProfileViewModel::class.java)
  
  profileBinding = DataBindingUtil.inflate(
      inflater,
      R.layout.fragment_profile,
      container,
      false
  )
  
  popupBinding = FragmentPopupBinding.inflate(LayoutInflater.from(context))
  dialog = context?.let { Dialog(it) }!!
  dialog.setContentView(popupBinding.root)
  dialog.window?.setBackgroundDrawableResource(android.R.color.transparent)
  
  profileBinding.viewModel = viewModel
  popupBinding.vm = viewModel
  
  getSender()
  
  return profileBinding.root
  }
  
  override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
  super.onViewCreated(view, savedInstanceState)
  
  settingsButtonProfile.visibility = View.GONE
  
  messageButtonProfile.setOnClickListener {
      showPopUp()
  }
  
  val receiver by lazy {
      arguments?.let { fromBundle(it).user }
  }
  
  viewModel.receiver = receiver
  
  }
  
  private fun showPopUp() {
  dialog.show()
  
  val switch = dialog.visibilitySwitchPopup
  val visibilityTextView = dialog.visibilityTextViewPopup
  
  dialog.closeButtonPopUp?.setOnClickListener {
      dialog.dismiss()
  }
  
  switch?.setOnClickListener {
      val isIconEnabled = switch.isIconEnabled
      if (isIconEnabled) {
          visibilityTextView?.text = getString(R.string.anonymous_prompt)
      } else {
          visibilityTextView?.text = getString(R.string.anonymous_warning)
      }
      switch.switchState()
  }
  
  }
  
  private fun getSender() {
  viewModel.getLoggedInUser()?.let { viewModel.sender = it }
  }
  
  }
  </code></pre>
  
  <p>Any help would be appreciated!</p>