-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation improvements for ViewModel lifecycle and Android Presenter #2229
Conversation
…general improvements
…FragmentPresentationAttribute
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.
Some typos i found
|
||
It should be noted however that it is not 100% reliable but it should work for most of the apps. We don't know what you do in the lifecycle of your app and what could interfere with the called order of the viewmodel lifecycle events. |
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.
Typo: What whether that
|
||
### MvxFragmentPresentationAttribute | ||
|
||
A Fragment is hosted inside an Activity (or a fragment). By using this ViewPresenter, you can decide whether to make all of your screens Activities, or to use an Activity host and many Fragments inside of it. The framework will then help you setting up the navigation and backstack. |
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.
This sentence seems weird to me: "will then help you setting up the navigation and backstack"
|
||
A Fragment is hosted inside an Activity (or a fragment). By using this ViewPresenter, you can decide whether to make all of your screens Activities, or to use an Activity host and many Fragments inside of it. The framework will then help you setting up the navigation and backstack. | ||
|
||
The ViewPresenter supports also nested fragments in one level: This means you can show fragments inside of a Fragment without extending any code!. |
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.
"!."
|
||
### MvxViewPagerFragmentPresentationAttribute | ||
This attribute extends `MvxViewPagerFragmentPresentationAttribute`, which means you can use all the properties it provedes to customize the presentation. use this attribute over a Fragment view class to display a fragment inside of a ViewPager with TabLayout and take advantage of even more customization with this property: |
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.
"provedes"
@@ -75,16 +106,20 @@ The presenter is completely extensible! You can override any attribute and custo | |||
You can also define new attributes to satisfy your needs. The steps to do so are: | |||
|
|||
1. Add a new attribute that extends `MvxBasePresentationAttribute` | |||
2. Subclass `MvxAppCompatViewPresenter` and make it the presenter of your application in Setup.cs (by overriding the method `CreatePresenter`). | |||
2. Subclass `MvxAndroidViewPresente` or `MvxAppCompatViewPresenter` and make it the presenter of your application in Setup.cs (by overriding the method `CreatePresenter`). |
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.
"MvxAndroidViewPresente"
@MarcBruins thanks for flagging 👍! I'll make a new PR today fixing this |
✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)
Documentation update and minor code improvement.
Documentation for Android Presenter is very limited, also new lifecycle is not explicitly detailed anywhere.
🆕 What is the new behavior (if this is a feature change)?
Improved documentation.
💥 Does this PR introduce a breaking change?
No.
🐛 Recommendations for testing
Read the docs.
📝 Links to relevant issues/docs
🤔 Checklist before submitting