Android ButterKnife library is a view injection library that injects views into android activity / fragments using annotations. For example, @BindView annotation avoids using findViewById() method by automatically type casting the view element. Not just view binding, butterknife provides lot of other useful options like binding strings , dimens , drawables , click events and lot more. 1. Adding ButterKnife Dependency First thing you have to do is, add ButterKnife in your project by adding the below dependencies in your project’s app/build.gradle file. Once added, sync your project, you are good to go. android { .. . // Butterknife requires Java 8. compileOptions { sourceCompatibility JavaVersion . VERSION_1_8 targetCompatibility JavaVersion . VERSION_1_8 } } dependencies { implementation ' com.jakewharton:butterknife:10.2.2 ' annotationProcessor ' com.jakewharton:butterknife-com...
Find Latest Code And Information About Android.