Suggest the best way to solve this type of compiler warning in Android Studio 3.3
Note: I found many solutions to avoid the warnings and uncheck the Studio inspection. But I am expecting something different.
Example: If warning Parameter 'view1' is never used is in the button onClick method.
Method
fun buttonClicked(view1: View) {
// Call Intent to new Activity .
// Parameter **view1** is not used }
Call method from XML
<Button
android:id="@+id/button_id"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:onClick="@{viewModel::buttonClicked}"
android:text="@string/example" />.
So we need (view1: View) parameter for the method for onClick. But it is not used. How can I solve this warning?. (Just one example).