Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Added AutoRotateStackLayout #222

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Added AutoRotateStackLayout #222

wants to merge 1 commit into from

Conversation

nbadakh
Copy link
Contributor

@nbadakh nbadakh commented Jul 24, 2018

- The AutoRotateStackLayout displays its contents along the horizontal axis by default.
- If the contents do not fit along the horizontal axis, the AutoRotateStackLayout switchs
to displaying them along the vertical axis.
- The AutoRotateStackLayout uses to StackLayouts to implement its behavior.
- Also added AutoRotateStackViewController to demonstrate the use of AutoRotateStackLayout.
TODO:
Add tests.

@nbadakh
Copy link
Contributor Author

nbadakh commented Jul 24, 2018

- Attached screenshots:

landscape_horizontal_axis

portrait_vertical_axis

@FabianTerhorst
Copy link

This would be the first none essential layout that would go into the library. Wouldn't it make more sense to split it in an sub project?

@nbadakh
Copy link
Contributor Author

nbadakh commented Jul 26, 2018

Added unit tests

@staguer
Copy link
Contributor

staguer commented Jul 27, 2018

@FabianTerhorst you bring up a good point, thank you, we'll consider it.

- The AutoRotateStackLayout displays its contents along the horizontal axis by default.
- If the contents do not fit along the horizontal axis, the AutoRotateStackLayout switchs
  to displaying them along the vertical axis.
- The AutoRotateStackLayout uses to StackLayouts to implement its behavior.
- Also added AutoRotateStackViewController to demonstrate the use of AutoRotateStackLayout.
- Added unit tests.
@nbadakh
Copy link
Contributor Author

nbadakh commented Jul 30, 2018

Fixed merge conflicts.

@staguer
Copy link
Contributor

staguer commented Oct 1, 2018

@FabianTerhorst We're considering generalizing this component a bit. It would take an array of layout options and at measurement time it would pick the first one that fits. Sounds like a useful primitive for apps that need to support Dynamic Type and languages with long words. What do you think?

@FabianTerhorst
Copy link

Sounds good.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants