Reputation: 6181
I have a View that depending on the available screen space does not need to be visible. Is there an easy way to detect if it will fit on the screen properly?
Upvotes: 0
Views: 122
Reputation: 11782
This sounds like a Job for having different layouts depending on screen size. If you set up your layout folders by screen size, you can specify different layouts for a small or a large screen:
layout-small
-> my_layout.xml
layout-large
-> my_layout.xml
layout-600sw # tablet
-> my_layout.xml
etc.
See this blog post for reference
Upvotes: 1