I have to write an app for tablet and for phones too. The two app has the same functionality, but they have absolute different GUI.
For example the phone have 2 but
Put your tablet layouts in res/layout-large/
. Put your phone layouts in res/layout/
. Name them the same. Your activities will load the right ones based upon the device they run on. When you call findViewById()
to retrieve the extra buttons, and see that you get null
back, ignore them.
You may need additional layouts in places like res/layout-large-land/
(landscape for tablets), res/layout-xlarge/
(if you want to handle 10+" tablets differently than stuff in the 5-9" range), res/layout-small/
(if you want to handle <3" screens), etc.