Closed goodsoft closed 9 years ago
Nice catch, will merge soon. Would you care to rebase?
Seems rebased to me
I think this will be a breaking change to existing clients.. I think it's a great change, but this alone might warrant a major version update.
Thinking about htis more, we do have the ability to cancel the super call using the @ManualSuper
annotation (this needs to be documented). So the question is, should we remove the super call altogether?
That is how we get around this issue in our app.
Oh wow, didn't know about that annotation. So should I just write something like this:
@OnBackPressed @ManualSuper
void onBackPressed() {
// ...
}
and the super.onBackPressed()
won't be called, right?
Okay, @ManualSuper(name = "onBackPressed")
and NOT calling generated SUPER.onBackPressed()
method solved the problem, so closing this PR.
Yes, and this feature needs to be docuemnted.
By the way, the documentation is git friendly and super easy to edit via Asciidoc. Here's the content: https://github.com/johncarl81/transfuse-site
Default implementation of
onBackPressed
method just finishes the activity. As the usual reason for overridingonBackPressed
is preventing activity finish, it doesn't seem reasonable to always callsuper.onBackPressed
. In case user still wants to finish the activity, he should call injected activity'sfinish()
method.