how can i create abstract classes in kotlin like java?

Thanks to @Stanislav Bondar

That was a Foolish mistake

The correct version is here bellow

notificationGenericAdapter = object : GenericAdapter<String, NotificationFragmentBinding>(this, list) {
    override fun getLayoutResId(): Int {
        return 0
    }

    override fun onBindData(model: String?, position: Int, dataBinding: NotificationFragmentBinding?) {}
    override fun onItemClick(model: String?, position: Int) {}
}

There was error of String and String? I was using String? but when I assign I was using String without null check

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top