Developing different views for different android devices?
Members - Reputation: 99
Posted 08 April 2012 - 03:21 PM
So if it's a tablet it will use main.xml and if its a smart phone it will use phone,xml for the menu.
Members - Reputation: 126
Posted 08 April 2012 - 08:43 PM
You can find a full explanation of these here:
Members - Reputation: 1109
Posted 24 April 2012 - 05:58 AM
You may want to look into providing alternative resources from the sdk documentation
This is the easiest way to go for what you are looking to do. Its actually one of androids most powerful features.
Essentially you create two layout folders
you place all your tablet specific layouts in the layout-xlarge and they will automatically be used on those devices. You don't need double up either so if you have the same layout on both the phone and tablet you just place it in the layout folder and it will be used everywhere.
You can do all sort of complicate layout changes using this method like:
layout-land and layout-xlarge-land if you want to use a different layout when the phone is in landscape mode.
"Fate and Destiny only give you the opportunity, the rest you have to do on your own."
"The people who don't enjoy life are the ones who don't get the joke."
The Aspiring Writer
Current Projects: Day 0 - prototype post apocalyptic survival game - Design V2
Upcoming Projects: Sanctuary Zero - post apocalyptic survival game - Design V2
Non Game Projects:
- Pocket Financial Assistant - android app - Personal Finance Organizer and Budgeting Manager.