Answers for "enable view binding android"

1

enable view binding android

buildFeatures {
        viewBinding true
        }
Posted by: Guest on April-24-2021
1

using buidfeatures to enable viewbinding

// Android Studio 4.0
android {
    buildFeatures {
        viewBinding = true
    }
}
Posted by: Guest on September-03-2020
2

kotlin binding views to activity

// Adding this to your build.gradle (Module level)

plugins {
    id 'com.android.application'
    id 'kotlin-android'
    //Added:
    id 'kotlin-kapt'
    id 'kotlin-android-extensions'
}


// And having this in your layout
<Button
	android:id="@+id/btn_finish"
    (...)

// You ca use this in the .kt file
btn_finish.setOnClickListener {
	// Do Something
}
Posted by: Guest on December-13-2020

Code answers related to "enable view binding android"

Browse Popular Code Answers by Language