FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Extract the Activity implementation logic in a separate class. by atanasovg · Pull Request #2271 · NativeScript/NativeScript · GitHub

Extract the Activity implementation logic in a separate class. - #2271

Merged
vchimev merged 4 commits into
masterfrom
atanasovg/remove-activity-extend
Jun 9, 2016
Merged

vchimev merged 4 commits into
masterfrom
atanasovg/remove-activity-extend

Conversation

Copy link
Copy Markdown
Contributor

This pull removes the prerequisite for a specific Activity type for the core modules and enables scenarios where users will need custom Activity base type - e.g. YouTubeBaseActivity. The modules now depend on being notified externally for an Activity event - like onCreate.

Steps for providing extended Activity at user level:

  1. Add a new file, having the *.android.* suffix.
  2. Implement/override the needed methods.
  3. User must notify the core modules for the needed callbacks through the ui/frame/AndroidActivityCallbacks interface.
  4. The static-binding-generator will take care of generating the new Activity class. The default one provided by the modules will be either overridden or will not be used (in case of a new Activity name).
    5 User must update the manifest file if the Activity name, defined through the JavaProxy decorator, is changed to a new one.

Cons: The biggest concern with this approach is that if the user misses to call to the modules upon some needed event then the behavior of the entire application will become indeterminate and the app will either crash or perform in an unexpected way.

ns-bot added the cla: yes label Jun 8, 2016

Copy link
Copy Markdown
Contributor

👍 from the snapshot point of view

Copy link
Copy Markdown
Contributor

👍 after successful build.

vchimev commented Jun 9, 2016

Copy link
Copy Markdown
Contributor

👍
merge in order to have green build

vchimev merged commit cf06073 into master Jun 9, 2016
atanasovg added this to the 2.1 milestone Jun 10, 2016
atanasovg deleted the atanasovg/remove-activity-extend branch June 10, 2016 09:45

lock Bot commented Aug 28, 2019

Copy link
Copy Markdown

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock Bot locked and limited conversation to collaborators Aug 28, 2019
This file contains hidden or 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL