I'm using View model and DataBinding. I have some data which is fetched from server and should be passed to ui. there for I wrote this view model class:

```

class ProfileViewModel(val context: Context) : ViewModel() {

    private val viewModelJob = Job()
    private val scope = CoroutineScope(Dispatchers.Main + viewModelJob)
    val name = MutableLiveData<String>()
    val subscription = MutableLiveData<String>()
    val followers = MutableLiveData<String>()
    val following = MutableLiveData<String>()
    val signals = MutableLiveData<String>()
    val image = MutableLiveData<String>()

    fun getUserInfo() {
        scope.launch {
            withContext(Dispatchers.Default) {
                val request =
                    JsonObjectRequest(Request.Method.POST, Address().UserInfoAPI, null,
                        Response.Listener {
                            name.value = it.getString("name")
                            image.value = it.getString("image")
                            subscription.value = it.getString("subscription")
                            followers.value = it.getString("followers")
                            following.value = it.getString("following")
                            signals.value = it.getString("signals")
                        }, Response.ErrorListener {
                            Log.i("Log", "error $it")
                        })

                val queue = Volley.newRequestQueue(context)
                queue.add(request)
            }
        }
    }

    override fun onCleared() {
        super.onCleared()
        scope.cancel()
    }
}

```

and I have used this view model in my xml layout like this:

```
<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">

    <data>

        <variable
            name="viewModel"
            type="com.app.main.profile.ProfileViewModel" />
    </data>

<!--- this is just one sample of my elements------>
        <TextView
            android:id="@+id/name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@{viewModel.name}"
            android:textAppearance="@style/vazir_font"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/avatarHolder" />

</layout>

```

and here is my Fragment code:

```

class ProfileFragment : Fragment() {

    private lateinit var binding: FragmentProfileBinding

    override fun onCreateView(
        inflater: LayoutInflater, container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        binding = DataBindingUtil.inflate(inflater, R.layout.fragment_profile, container, false)
        return binding.root
    }

    override fun onActivityCreated(savedInstanceState: Bundle?) {
        super.onActivityCreated(savedInstanceState)

        val factory = ProfileViewModelFactory(context!!)
        val viewModel = ViewModelProvider(this, factory).get(ProfileViewModel::class.java)

        viewModel.getUserInfo()
        binding.viewModel = viewModel

        binding.exit.setOnClickListener {
            Utils(context!!).isLoggedIn = false
        }
    }

}

```

my problem is the TextViews will not fill with server response and they remain empty.
how can I solve this problem?