Reputation: 553
I was wondering whats the best way to rotate a GridView with the scrollbar also changing orientation when a user rotates their screen. The rotation example of what I want to accomplish:
Portrait
| Part 1 | Part 2 |
-------------------
| 5 | 6 | |
| 4 | 3 | |
| 2 | 4 | V
| 5 | 1 |
Landscape
-------------------------------
Part 1 | 5 | 4 | 2 | 5 |
--------------------------------
Part 2 | 6 | 3 | 4 | 1 |
--->
I couldn't find any android/java libraries that could accomplish this. Maybe I need to use the Matrix object to do some rotation manipulation? Hope someone can point me in the right direction.
Upvotes: 2
Views: 2164
Reputation: 6714
Here is a nice tutorial that demonstrates what you are looking for. Here is the link:
http://spragucm.wordpress.com/2013/11/17/android-horizontal-and-vertical-gridview-tutorial/
I hope this helps.
Upvotes: 2