Domanda

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. :)

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top