Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

user interface in Android for smartphone for tablet

 
Ferdinand Victorinus
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I program an user interface in Android for smartphone, if I want this application on a tablet..... do I need to program another user interface?
 
Cameron Banga
Author
Greenhorn
Posts: 16
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great question. I'll answer the best I can here, but feel free to follow up if it doesn't help.

Android's design strategy is great for tackling multiple size screens, as you can customize as much as you're able to, in order to provide the most customized and optimal experience for your users.

Typically, your interface files will be created as XML layout files in your resources directory. I'm attaching an image here from an Android app I'm working on today:



Here, I'm just getting started on Android tablet support. So I have our standard layout xml files, in default directory. I've then created two other directories to keep layout xml files as well, layout-sw600dp and layout-sw720dp. The first directory here will be referenced for devices larger than 600dp in width. The second folder will take over once the app needs to render it's interface on a screen 720dp or higher.

As you can see, we'll name the file the same and have it in the individual directories. So I can optimize my layout here for larger 600dp (think Nexus 7, smaller tablets), and very large 720dp+ (Nexus 10 like) devices.

For more info, see this great link! http://developer.android.com/training/multiscreen/screensizes.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic