This repository has been archived by the owner on Mar 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 101
Feature: restrict TiFragment api for subclasses #79
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…om the DelegatedTiFragment interface as final so they cannot be overridden by subclasses.
… requires calling the super implementation because TiFragment uses this lifecycle methods to manage the TiFragmentDelegate instance.
ghost
added
the
Ready for Review
label
Apr 4, 2017
ghost
changed the title
Feature/restrict tifragment api for subclasses
Feature: restrict TiFragment api for subclasses
Apr 4, 2017
passsy
approved these changes
Apr 4, 2017
Do the same for |
@passsy I'm not sure whether or not |
|
StefMa
reviewed
Apr 5, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As @passsy mentioned. Please add the CallSuper to onRetainCustomNonConfigurationInstance
inside the TiActivtiy
... 👍
Rest looks good
…tivityPlugin and the TiFragmentPlugin.
I applied your suggestions to the |
|
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 pull request restricts the
TiFragment
api by declaring some implemented methods from theDelegatedTiFragment
-Interface asfinal
so they cannot be overridden by subclasses.It also adds the
@CallSuper
-Annotation to all important lifecycle methods that requires calling the super implementation becauseTiFragment
uses this lifecycle methods to manage theTiFragmentDelegate
instance.This should help to prevent issues which are caused by extending
TiFragment
and not call its respective super implementations (see #29 for example).@passsy suggested to use the
FragmentManager.FragmentLifecycleCallbacks
(https://developer.android.com/reference/android/support/v4/app/FragmentManager.FragmentLifecycleCallbacks.html) to enforce the calls on the managedTiFragmentDelegate
instance but since we are trying to hit the 0.8.0 release i think this would be a rather drastic improvement.