I have an Activity where an interface is declared and I have a `ViewModel` class which has overridden interface and want to invoke the method of interface from `Activity` to make changes in `ViewModel` class but unable to call method in `Activity` saying **ViewModel class does not have a companion object, and thus must be initialized here**. How to resolve this?

```
var selection: setSelectionSubRow? = null
    selection=RowSubTShirtViewModel
    selection!!.setNameSelection(false)

```

above code is in `Activity` whose name is `TShirtActivity`.

below code is from `RowViewModel` class

```
class RowSubTShirtViewModel(private val subTShirtAdapter: SubTShirtAdapter, val context: TShirtActivity,
                        val tShirtBean: CommonItemBean, private val parentPosition: Int, private val position: Int) : BaseObservable() ,TShirtActivity.setSelectionSubRow{

fun getImageDrawable(): Drawable {
    return if (tShirtBean.isSelected)
        ContextCompat.getDrawable(context, R.drawable.green_border_circle)!!
    else
        ContextCompat.getDrawable(context, R.drawable.border_circle)!!
}

override fun setNameSelection(selection: Boolean) {
    if (parentPosition == 6) {
        if (position == 1) {
            tShirtBean.isSelected = false
        }
    }
}

```