skip to Main Content

Android Studio – what is the replacement for onclick ( depecrated ) in kotlin?

I want use android:onClick to access the functions at MainActivity from activity_main.xml but it's deprecated. Is there another way or replacement for onClick? Here the code: <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:orientation="horizontal"> <Button android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:textSize="30dp" android:id="@+id/btn00" android:onClick="click"></Button></LinearLayout> and my…

VIEW QUESTION
Back To Top
Search