ALL SIZES FIT ONE        A Thrilling Adventure in Application Design for                            TabletsMonday, Septemb...
ALBERT LAI                 @albertlai                 JEAN HSU                 @jyhsu                 ANDROID AT PULSEMond...
SHAMELESS PLUG!Monday, September 12, 2011
PART I                             e Human ComponentMonday, September 12, 2011
WHEN DEVELOPERS  SAY SOMETHING IS  IMPOSSIBLE...  THEY’RE LYINGMonday, September 12, 2011
TABLETS ARE A  COMPLETELY NEW  EXPERIENCE. DESIGN  APPROPRIATELY.Monday, September 12, 2011
NEVER TRUST   THE SYSTEM TO   DO A HUMAN’S   JOBMonday, September 12, 2011
DIALOGS CAN KEEP  YOUR APP FROM  LOOKING SILLYMonday, September 12, 2011
stretchy                             SILLYMonday, September 12, 2011
dialog                             BETTER!Monday, September 12, 2011
USERS ROTATE  TABLETS. THIS IS A  FACT OF LIFE.Monday, September 12, 2011
THINK OF HANDHELD  AND TABLET-STAND  STYLE USAGESMonday, September 12, 2011
THUMB FRIENDLY NAVIGATIONMonday, September 12, 2011
PART II                      Now for the Technical StuffMonday, September 12, 2011
RELATIVE LAYOUTS  ARE AN ANDROID  DEVELOPER’S BEST  FRIENDMonday, September 12, 2011
ALIGN PARENT TOP      ALIGN PARENT LEFT                             ALIGN PARENT RIGHT                             CENTER ...
ALIGN PARENT TOP                   ALIGN PARENT RIGHT    ALIGN PARENT LEFT                   CENTER VERTICAL              ...
DEFINING A TABLET  IS LIKE NAILING  JELLO TO A WALL                             ???   ???Monday, September 12, 2011
IS THIS A REALLY BIG PHONE?Monday, September 12, 2011
OR A REALLY SMALL TABLET?Monday, September 12, 2011
IT’S DANGEROUS TO  GO ALONE. TAKE  THESE RESOURCE  FOLDERS   large, xlarge   mdpi, hdpi, xhdpiMonday, September 12, 2011
values/theme.xml          <style name="ConditionalDialog"                 parent="@android:style/Theme.Black">            ...
values-xlarge/theme.xml          <style name="ConditionalDialog"                 parent="@android:style/Theme.Dialog">    ...
HOW DO YOU KNOW  WHAT SIZE DEVICE  YOU’RE ON IN CODE?Monday, September 12, 2011
IN YOUR LAYOUT XML  FILE:   <include layout="@layout/screen_size" />Monday, September 12, 2011
layout/theme.xml         <?xml version="1.0" encoding="utf-8"?>         <View xmlns:android="http://schemas.android.com/ap...
layout-large/theme.xml         <?xml version="1.0" encoding="utf-8"?>         <View xmlns:android="http://schemas.android....
THERE ARE NO  MAGIC NUMBERS.Monday, September 12, 2011
THERE ARE NO  MAGIC NUMBERS.   DIMENS.XML   INTEGERS.XMLMonday, September 12, 2011
NEVER SCALE UP  ASSETS. USERS CAN  TELL FROM THE  PIXELS.Monday, September 12, 2011
USE A HELPER CLASS  FOR THE TRICKIER  DIMENSIONSMonday, September 12, 2011
screen_width / 3Monday, September 12, 2011
PART III                             HoneycombsMonday, September 12, 2011
I CAN HAZ FEATURES?Monday, September 12, 2011
I CAN HAZ FEATURES?                             mEditor.apply();                                   since API Level 9Monday...
REFLECTION  Method m = SharedPreferences.Editor.class.getMethod("apply");  // ...  if (m != null) {       m.invoke(mEditor...
WRAPPER   classes not loaded (and verified) until it   is called the first time   only load the wrapper class if new   funct...
PART IV                             Optimizing for the                               HoneycombsMonday, September 12, 2011
ONE-LINERS FTW    android:targetSdkVersion="11"   android:hardwareAccelerated="true"Monday, September 12, 2011
MENU PLEASE..                             pulse before                                  ??Monday, September 12, 2011
BYOACTION BARS                             LEFT-ALIGNED LOGO     ACTIONS                                                  ...
FRAGMENTS   (NOT THE BAD KIND)Monday, September 12, 2011
PART IV                              APKsMonday, September 12, 2011
MULTIPLE APK    SUPPORT                             PHONE   TABLET                              APK     APKMonday, Septemb...
ONE APK TO RULE    THEM ALL                              SUPER                             AWESOME                        ...
TEST LIKE YOUR LIFE    DEPENDS ON IT                             before each release                             and all t...
BUT DON’T TAKE OUR    WORD FOR IT    EXPLORE AND    CREATE!Monday, September 12, 2011
Upcoming SlideShare
Loading in …5
×

Pulse News: porting android app to tablet

1,123 views
1,054 views

Published on

http://paug.fr

Published in: Technology, News & Politics
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,123
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Pulse News: porting android app to tablet

  1. 1. ALL SIZES FIT ONE A Thrilling Adventure in Application Design for TabletsMonday, September 12, 2011
  2. 2. ALBERT LAI @albertlai JEAN HSU @jyhsu ANDROID AT PULSEMonday, September 12, 2011
  3. 3. SHAMELESS PLUG!Monday, September 12, 2011
  4. 4. PART I e Human ComponentMonday, September 12, 2011
  5. 5. WHEN DEVELOPERS SAY SOMETHING IS IMPOSSIBLE... THEY’RE LYINGMonday, September 12, 2011
  6. 6. TABLETS ARE A COMPLETELY NEW EXPERIENCE. DESIGN APPROPRIATELY.Monday, September 12, 2011
  7. 7. NEVER TRUST THE SYSTEM TO DO A HUMAN’S JOBMonday, September 12, 2011
  8. 8. DIALOGS CAN KEEP YOUR APP FROM LOOKING SILLYMonday, September 12, 2011
  9. 9. stretchy SILLYMonday, September 12, 2011
  10. 10. dialog BETTER!Monday, September 12, 2011
  11. 11. USERS ROTATE TABLETS. THIS IS A FACT OF LIFE.Monday, September 12, 2011
  12. 12. THINK OF HANDHELD AND TABLET-STAND STYLE USAGESMonday, September 12, 2011
  13. 13. THUMB FRIENDLY NAVIGATIONMonday, September 12, 2011
  14. 14. PART II Now for the Technical StuffMonday, September 12, 2011
  15. 15. RELATIVE LAYOUTS ARE AN ANDROID DEVELOPER’S BEST FRIENDMonday, September 12, 2011
  16. 16. ALIGN PARENT TOP ALIGN PARENT LEFT ALIGN PARENT RIGHT CENTER VERTICALALIGN PARENT BOTTOM CENTER HORIZONTALMonday, September 12, 2011
  17. 17. ALIGN PARENT TOP ALIGN PARENT RIGHT ALIGN PARENT LEFT CENTER VERTICAL ALIGN PARENT BOTTOM CENTER HORIZONTALMonday, September 12, 2011
  18. 18. DEFINING A TABLET IS LIKE NAILING JELLO TO A WALL ??? ???Monday, September 12, 2011
  19. 19. IS THIS A REALLY BIG PHONE?Monday, September 12, 2011
  20. 20. OR A REALLY SMALL TABLET?Monday, September 12, 2011
  21. 21. IT’S DANGEROUS TO GO ALONE. TAKE THESE RESOURCE FOLDERS large, xlarge mdpi, hdpi, xhdpiMonday, September 12, 2011
  22. 22. values/theme.xml <style name="ConditionalDialog" parent="@android:style/Theme.Black"> <item name="android:windowNoTitle">true</item> </style>Monday, September 12, 2011
  23. 23. values-xlarge/theme.xml <style name="ConditionalDialog" parent="@android:style/Theme.Dialog"> <item name="android:windowNoTitle">true</item> </style>Monday, September 12, 2011
  24. 24. HOW DO YOU KNOW WHAT SIZE DEVICE YOU’RE ON IN CODE?Monday, September 12, 2011
  25. 25. IN YOUR LAYOUT XML FILE: <include layout="@layout/screen_size" />Monday, September 12, 2011
  26. 26. layout/theme.xml <?xml version="1.0" encoding="utf-8"?> <View xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/screen_size_normal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="gone"/>Monday, September 12, 2011
  27. 27. layout-large/theme.xml <?xml version="1.0" encoding="utf-8"?> <View xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/screen_size_large" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="gone"/>Monday, September 12, 2011
  28. 28. THERE ARE NO MAGIC NUMBERS.Monday, September 12, 2011
  29. 29. THERE ARE NO MAGIC NUMBERS. DIMENS.XML INTEGERS.XMLMonday, September 12, 2011
  30. 30. NEVER SCALE UP ASSETS. USERS CAN TELL FROM THE PIXELS.Monday, September 12, 2011
  31. 31. USE A HELPER CLASS FOR THE TRICKIER DIMENSIONSMonday, September 12, 2011
  32. 32. screen_width / 3Monday, September 12, 2011
  33. 33. PART III HoneycombsMonday, September 12, 2011
  34. 34. I CAN HAZ FEATURES?Monday, September 12, 2011
  35. 35. I CAN HAZ FEATURES? mEditor.apply(); since API Level 9Monday, September 12, 2011
  36. 36. REFLECTION Method m = SharedPreferences.Editor.class.getMethod("apply"); // ... if (m != null) { m.invoke(mEditor); } else { mEditor.commit(); } Monday, September 12, 2011
  37. 37. WRAPPER classes not loaded (and verified) until it is called the first time only load the wrapper class if new functionality existsMonday, September 12, 2011
  38. 38. PART IV Optimizing for the HoneycombsMonday, September 12, 2011
  39. 39. ONE-LINERS FTW android:targetSdkVersion="11" android:hardwareAccelerated="true"Monday, September 12, 2011
  40. 40. MENU PLEASE.. pulse before ??Monday, September 12, 2011
  41. 41. BYOACTION BARS LEFT-ALIGNED LOGO ACTIONS OVERFLOW Text NO MENUMonday, September 12, 2011
  42. 42. FRAGMENTS (NOT THE BAD KIND)Monday, September 12, 2011
  43. 43. PART IV APKsMonday, September 12, 2011
  44. 44. MULTIPLE APK SUPPORT PHONE TABLET APK APKMonday, September 12, 2011
  45. 45. ONE APK TO RULE THEM ALL SUPER AWESOME APKMonday, September 12, 2011
  46. 46. TEST LIKE YOUR LIFE DEPENDS ON IT before each release and all the time wherever you can on every device and every api levelMonday, September 12, 2011
  47. 47. BUT DON’T TAKE OUR WORD FOR IT EXPLORE AND CREATE!Monday, September 12, 2011

×