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

Allow ModelView usage without an xml layout #282

Merged
merged 2 commits into from
Sep 13, 2017
Merged

Allow ModelView usage without an xml layout #282

merged 2 commits into from
Sep 13, 2017

Conversation

elihart
Copy link
Contributor

@elihart elihart commented Sep 13, 2017

Instead of needing to create an xml layout for each @ModelView view, you can use the @ModelView( autoLayout = Size. ...) param to specify what layout params you want for your view.

Epoxy will then programmatically create the view and the layout params for you.

Looking for feedback on naming, if this seems good I will flesh out comments and tests.

There were a couple different approaches we could take here, I chose a simple path with just one param so that it is very quick and easy to set this up. I figure that if anybody wants more control with exact sizing they can use an xml file.

Also, we will be releasing more powerful dynamic styling support soon which will also help with the more complex cases, and given that it seems nice to keep one very simple approach.

@elihart elihart merged commit f4cb94c into master Sep 13, 2017
@elihart elihart deleted the eli-autolayout branch September 13, 2017 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant