Seems like there is no way to do so and, therefore, I will carry on with my life, as suggested in one of the comments.
Go back / finish function directly in called onClick, without further code
-
17-07-2023 - |
Vra
I know I can have something like:
<ImageView
android:id="@+id/zoomImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:onClick="goBack"
android:src="@drawable/zoom_selector" />
and then a function like
public void goBack(View v){
finish();
}
but I was wondering if there is any key/reserved word to do exactly that, without having to create my own function. Something like
android:onClick="reservedWordThatFinishesTheCurrentActivity"
I´m curious about it. :)
Oplossing
Gelisensieer onder: CC-BY-SA met toeskrywing
Nie verbonde aan StackOverflow