Android2.x/3.x/4.x               2012/01/28        @korodroid
■                     @korodroid■       iplatform.org(http://www.iplatform.org/)■       NTT■            iplatform.org    ■...
➡     2.x/3.x/4.x2.x      4.x3.x                 3
2.x/3.x/4.x                     1apk2.x-                 2.x-                            4
2.x/3.x/4.x                     1apk3.x-                 3.x-                            5
2.x/3.x/4.x                     1apk4.x-                 4.x-                            6
•••• ,etc.                   API• Fragment?• OptionMenu?ActionBar?• ,etc.                          7
small,normal,large,xlarge                   •   xlarge screens are at least 960dp x 720dp                   •   large scre...
sw<N>dp,w<N>dp,h<N>dp    (a)layout-sw600dp              600dp        (b)layout-w720dp   720dp        (c)layout-h480dp   48...
sw<N>dp,w<N>dp,h<N>dp     (a)layout-sw600dp           600dp     (b)layout-w720dp    720dp     (c)layout-h480dp    480dp   ...
(A) •res/layout/main.xml •res/layout-sw600dp/main.xml(B) •res/layout/main.xml •res/layout-sw600dp/main.xml •res/layout-sw7...
API−FragmentPane       Fragment A   Fragment B                                 12
API−FragmentCompatibility Package                           2.x                              2.x              3.x         ...
API−ActionBar  Action Bar=2.x-OptionMenu     3.x-ActionBar                                   14
API−ActionBarAndroidManifest                                2.x                 3.x minSdk=     targetSdk=   minSdk=8 targ...
API−ActionBarAndroidManifest                                     2.x            4.x(     ) minSdk=     targetSdk=   minSdk...
API−ActionBar AndroidManifest                           2.x          3.x         4.x(         )minSdk=     targetSdk=  min...
API−ActionBar       AndroidManifest                                  2.x         3.x       4.x(   )   minSdk=        targe...
API−ActionBar            OptionMenu         ActionBar                        2.x            3.x            4.x        Opti...
Tips1.wrap_content     fill_parent(match_parent)     ➡px     ➡Java                  px2.     ➡Android3.Fragment  ➡         ...
Android                  Developer•Supporting Tablets and Handsets  http://developer.android.com/guide/practices/tablets-a...
22
Upcoming SlideShare
Loading in …5
×

Android2.x/3.x/4.x向けアプリ開発で気付いたこと

3,183 views

Published on

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

No Downloads
Views
Total views
3,183
On SlideShare
0
From Embeds
0
Number of Embeds
233
Actions
Shares
0
Downloads
0
Comments
0
Likes
6
Embeds 0
No embeds

No notes for slide

Android2.x/3.x/4.x向けアプリ開発で気付いたこと

  1. 1. Android2.x/3.x/4.x 2012/01/28 @korodroid
  2. 2. ■ @korodroid■ iplatform.org(http://www.iplatform.org/)■ NTT■ iplatform.org ■ Android 16 9 10 2
  3. 3. ➡ 2.x/3.x/4.x2.x 4.x3.x 3
  4. 4. 2.x/3.x/4.x 1apk2.x- 2.x- 4
  5. 5. 2.x/3.x/4.x 1apk3.x- 3.x- 5
  6. 6. 2.x/3.x/4.x 1apk4.x- 4.x- 6
  7. 7. •••• ,etc. API• Fragment?• OptionMenu?ActionBar?• ,etc. 7
  8. 8. small,normal,large,xlarge • xlarge screens are at least 960dp x 720dp • large screens are at least 640dp x 480dp • normal screens are at least 470dp x 320dp • small screens are at least 426dp x 320dp•7” 5” large•Android3.0 8
  9. 9. sw<N>dp,w<N>dp,h<N>dp (a)layout-sw600dp 600dp (b)layout-w720dp 720dp (c)layout-h480dp 480dp (a)false (a)false (a)true400dp (b)true 960dp (b)false 720dp (b)true (c)false (c)true (c)true 960dp 1280dp 9 400dp
  10. 10. sw<N>dp,w<N>dp,h<N>dp (a)layout-sw600dp 600dp (b)layout-w720dp 720dp (c)layout-h480dp 480dp •Developer ➡ Android3.2 ➡small,normal,large,xlarge ➡ v11,v13• dp GN 360x592(dp) 598x360(dp) 10
  11. 11. (A) •res/layout/main.xml •res/layout-sw600dp/main.xml(B) •res/layout/main.xml •res/layout-sw600dp/main.xml •res/layout-sw720dp/main.xml(C) •res/layout/main.xml •res/layout-w600dp/main.xml 11
  12. 12. API−FragmentPane Fragment A Fragment B 12
  13. 13. API−FragmentCompatibility Package 2.x 2.x 3.x 4.x Compatibility Package Compatibility Package•Fragment•Compatibility Package • android.app.Fragment->android.support.v4.Fragment • Activity->FragmentActivity •,etc. 13
  14. 14. API−ActionBar Action Bar=2.x-OptionMenu 3.x-ActionBar 14
  15. 15. API−ActionBarAndroidManifest 2.x 3.x minSdk= targetSdk= minSdk=8 targetSdk=8 minSdk=8 targetSdk=11 8:Android2.2, 11:Android3.0 NG2 NG1 15
  16. 16. API−ActionBarAndroidManifest 2.x 4.x( ) minSdk= targetSdk= minSdk=8 targetSdk=8 minSdk=8 targetSdk=11 8:Android2.2, 11:Android3.0 ActionBar NG3 NG4 showAsAction 16
  17. 17. API−ActionBar AndroidManifest 2.x 3.x 4.x( )minSdk= targetSdk= minSdk=8 targetSdk=8 minSdk=8 targetSdk=11 8:Android2.2, 11:Android3.0 4.x 2.x 3.x 17
  18. 18. API−ActionBar AndroidManifest 2.x 3.x 4.x( ) minSdk= targetSdk= minSdk=8 targetSdk=8 minSdk=8 targetSdk=11•Java XML Manifest ( CaseByCase ) ➡ Blog•ICS Split ActionBar( ActionBar ) 18
  19. 19. API−ActionBar OptionMenu ActionBar 2.x 3.x 4.x OptionMenu ActionBar •2.x ActionBar Compatibility Package ➡ActionBar OptionMenu or ActionBarCompat• Action Bar OptionMenu ActionBar 19
  20. 20. Tips1.wrap_content fill_parent(match_parent) ➡px ➡Java px2. ➡Android3.Fragment ➡ Fragment ➡Activity Fragment ➡Fragment→Fragment IF 20
  21. 21. Android Developer•Supporting Tablets and Handsets http://developer.android.com/guide/practices/tablets-and-handsets.html•Supporting Multiple Screens http://developer.android.com/guide/practices/screens_support.html•Declaring Tablet Layouts for Android 3.2 http://developer.android.com/guide/practices/screens_support.html#DeclaringTabletLayouts 21
  22. 22. 22

×