Skip to content
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

Merged
merged 3 commits into from
Sep 26, 2017

Conversation

nmilcoff
Copy link
Contributor

✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)

Documentation update and minor code improvement.

⤵️ What is the current behavior?

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

  • All projects build
  • Follows style guide lines (code style guide)
  • Relevant documentation was updated (docs style guide)
  • Nuspec files were updated (when applicable)
  • Rebased onto current develop

@nmilcoff nmilcoff added the t/docs Documentation type label Sep 26, 2017
@nmilcoff nmilcoff added this to the 5.2.1 milestone Sep 26, 2017
@martijn00 martijn00 merged commit 1b5f7aa into MvvmCross:develop Sep 26, 2017
Copy link
Contributor

@MarcBruins MarcBruins left a 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.
Copy link
Contributor

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.
Copy link
Contributor

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!.
Copy link
Contributor

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:
Copy link
Contributor

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`).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"MvxAndroidViewPresente"

@nmilcoff
Copy link
Contributor Author

@MarcBruins thanks for flagging 👍! I'll make a new PR today fixing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t/docs Documentation type
Development

Successfully merging this pull request may close these issues.

3 participants