Stack Overflow archive
1 scoreaccepted

Call a Method from another Method Android

score
1
question views
545
license
CC BY-SA 3.0

It looks like goBack(View) is most likely from an onClick setup in your layout XML. Since you aren't using the view, just pass null:

java
@Override public void onBackPressed() {
  goBack(null);
}

Originally posted on Stack Overflow. Public user contributions are licensed under Creative Commons Attribution-ShareAlike.