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

Why are there two column count attributes? #32

Open
ataulm opened this issue Jan 18, 2014 · 6 comments
Open

Why are there two column count attributes? #32

ataulm opened this issue Jan 18, 2014 · 6 comments
Assignees
Milestone

Comments

@ataulm
Copy link
Contributor

ataulm commented Jan 18, 2014

There are two column count attributes - portrait and landscape. Are they needed?

I would expect only columnCount, and if I needed a different number for landscape, I'd include another layout in my layout-land directory which would have a different value for columnCount (if that was the only difference in my layout for landscape, I could use @integer/columnCount, so I'd have two resource files for integers instead).

It suggests that the view checks for device orientation; should that be the view's responsibility?

@denizmveli
Copy link
Contributor

This is discussed in #9.

We could add a columnCount property that works as you describe but removing the existing properties isn't an option.

Willing to contribute this change?

@denizmveli
Copy link
Contributor

Also see #26

@JakeWharton
Copy link
Contributor

Why can't you remove the existing ones? 2.0.0 is calling!

@JakeWharton
Copy link
Contributor

I read #9. I don't think you should make the public API suffer because someone is forced to handle configuration changes.

You could easily add the config change port/land column count handling in a subclass that's internal to your app.

@KennyGoers
Copy link

I'd agree that having it match the grid API more closely would make it an
easier drop in replacement for the grid
On Jan 23, 2014 3:13 AM, "Jake Wharton" notifications@github.com wrote:

I read #9 #9. I
don't think you should make the public API suffer because someone is forced
to handle configuration changes.

You could easily add the config change port/land column count handling in
a subclass that's internal to your app.


Reply to this email directly or view it on GitHubhttps://github.com//issues/32#issuecomment-33107604
.

@denizmveli
Copy link
Contributor

A new column_count attribute has been added that overrides orientation specific values. The sample and the README have been updated to reflect this as best practice.

I plan kill off the old values in v1.1.

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

No branches or pull requests

4 participants