This repository was archived by the owner on Feb 26, 2023. It is now read-only.
add @AfterExtras#928
Closed
dodgex wants to merge 18 commits intoandroidannotations:developfrom
dodgex:AfterExtra
Closed
add @AfterExtras#928dodgex wants to merge 18 commits intoandroidannotations:developfrom dodgex:AfterExtra
dodgex wants to merge 18 commits intoandroidannotations:developfrom
dodgex:AfterExtra
Conversation
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this PR adds an @AfterExtras annotation, that works similar to @AfterInject, but the methods are called every time a new intent is set to the activty by setIntent(Intent intent).
this allows an activity to get notified about new intents and so new extras.
the generated code looks like this
for multiple extras and/or methods, first all extras get injected and then the methods get called.
to be useful this currently needs this code block in the activity
currently known "issues", the first call to an @AfterExtras annotated method does not yet have
@Beanfields set. this would require to move theExtraHandlerbelow theBeanHandlerinAnnotationHandlers. i don't think that this would cause any issues. but i'll open a seperate PR for this change.