I have an android app that works on phone/tablet. I want to add support for Android TV.
Official documentation says to create a separate activity for TV.
Only difference between phone and TV is presentation layer (i.e. view), so I should only have to create new layouts, not the controller as well.
I created layouts that work for TV and use the same controller. Problem is that I cannot specify which layouts are for TV and which ones are for phones/tablets.
I cannot make assumptions about screen size and device type. Some phones have higher screen resolution than TVs and vice versa.
How can I provide different layouts for phone and TV?
If there is a better way to do this without writing (or copying) my existing java code I would accept that too.