AndroidStaggeredGrid
AndroidStaggeredGrid copied to clipboard
Why are there two column count attributes?
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?
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?
Also see #26
Why can't you remove the existing ones? 2.0.0 is calling!
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.
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" [email protected] wrote:
I read #9 https://github.com/etsy/AndroidStaggeredGrid/issues/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/etsy/AndroidStaggeredGrid/issues/32#issuecomment-33107604 .
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.