SlideShare ist ein Scribd-Unternehmen logo
1 von 48
Dominik Helleberg | inovex GmbH


  One APK to rule them all
Dominik Helleberg
 Mobile Development
 Android
 HTML5




    http://dominik-helleberg.de/+
    http://twitter.com/_cirrus_
Der Android Zoo
Besser?
The



F
Word
Der Android Zoo


    Challenging,
         but
Android is designed to
     handle that!
Getting started... Screens

         Resolution



Screensize            Density
Screensize

2‘‘      4‘‘      7‘‘       10‘‘
small   normal   large   xlarge
Resolution

                        1280x800
            1280x720

320 x 240
Density

120    160    200          300
ldpi   mdpi         hdpi     xhdpi
???

         Resolution



Screensize            Density
DP & SP




120    160    200          300
ldpi   mdpi         hdpi     xhdpi
PX vs. DP & SP
PX vs. DP & SP
Layout Manager




Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to
terms described in the Creative Commons 2.5 Attribution License.
PX vs. DP & SP
PX vs. DP & SP
Spezialisierte Layouts

layout/	
  
layout-­‐land/	
  
layout-­‐hdpi/	
  
layout-­‐large-­‐land/	
  
layout-­‐sw600dp/	
  
PX vs. DP & SP
Spezialisierte Layouts




Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to
terms described in the Creative Commons 2.5 Attribution License.
Ab wann ist man Tablet?

layout-­‐v11/	
  
layout-­‐land/	
  
layout-­‐xlarge/	
  
layout-­‐sw600dp/	
  
layout-­‐sw720dp/	
  
	
  
Activity vs. Fragment Control




Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to
terms described in the Creative Commons 2.5 Attribution License.
Activity vs. Fragment Control
    Tab           ActionBar




          click




 Fragment                     Fragment
                   Activity
Activity vs. Fragment Control
    Tab        ActionBar




       click




 Fragment                  Fragment
                Activity
Android À la carte




Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to
terms described in the Creative Commons 2.5 Attribution License.
Android À la carte - APIs
Intent	
  i	
  =	
  null;	
  
if(android.os.Build.VERSION.SDK_INT	
  >=	
  
	
  	
  	
  android.os.Build.VERSION_CODES.JELLY_BEAN)	
  
{	
  
             	
  i	
  =	
  new	
  Intent(this,	
  JellyBeanActivity.class);	
  
}	
  
else	
  
             	
  i	
  =	
  new	
  Intent(this,	
  DefaultActivity.class);	
  
Android À la carte - APIs
                       LocationUpdateRequester
                                             	
  




  LegacyUpdateRequester
                      	
                      FroyoUpdateRequester
                                                                 	
  




                                                       GingerBread
                                                                 	
  
                                                     UpdateRequester  	
  



http://code.google.com/p/android-protips-location/
Android À la carte - APIs


                   CompatLib
                           	
  




   CustomImpl
            	
  
                                  Wrapper
                                        	
  
Android À la carte - Ressourcen
values/bools.xml	
  
<resources>	
     	<bool name="ICS">false</bool>	
     	<bool name="preICS">true</bool>    	
</resources>	
  

	
  
values-­‐v14/bools.xml	
  
<resources>	
     	<bool name="ICS">true</bool>	
     	<bool name="preICS">false</bool>       	
</resources>	
  

	
  
Android À la carte - Ressourcen

       <service android:name=".ICSService" 	
                  android:enabled="@bool/ICS">	
       </service>	
  
	
  
Android À la carte - Ressourcen
  Layout
       	
               Layout-­‐v14
                                   	
  

  Header
       	
                 Header
                               	
  




  Content
        	
                Content
                                	
  
Android À la carte - Ressourcen
   Layout 	
                      Layout-­‐v14
                                             	
  
     	
                               	
  
 <include/>    	
     Header
                           	
     <include/> 	
  
                                      	
  



   Content
         	
                         Content
                                          	
  
Android À la carte - Ressourcen
Android À la carte - Ressourcen
Get it right - lint
Get it right - lint
Get it right - CI
Get it right – Real Devices
Fallbacks / Workarounds
<uses-sdk	
        android:minSdkVersion="8"	
        android:targetSdkVersion=“16" />	
	
<supports-screens .../>	
	
<compatible-screens ></compatible-screens>	
	
<uses-feature 	
     	 android:name="android.hardware.nfc"    	
     	 android:required="true"/>
Fallbacks / Workarounds




Target
     	
                                 Max	
  
   Sdk
     	
                                 Sdk	
  


        10             11-13           16
Fallbacks / Workarounds




                        Target
                             	
          Max	
  
                           Sdk
                             	
          Sdk	
  


10             11-13                16
Fallbacks / Workarounds

	
<supports-screens android:xlargeScreens="false" />
Fallbacks / Workarounds
Fallbacks / Workarounds
      <manifest ... >	
          <supports-screens 	
           	      	android:smallScreens="false"	
                    android:normalScreens="false"	
           	      	android:largeScreens="true"	
           	      	android:xlargeScreens="true"	
                    android:requiresSmallestWidthDp="600" />	
          ...	
          <application ... >	
               ...	
          </application>	
      </manifest>	


Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to
terms described in the Creative Commons 2.5 Attribution License.
Fallbacks / Workarounds
      <manifest ... >	
          <compatible-screens>	
               <!-- all small size screens -->	
               <screen android:screenSize="small" android:screenDensity="ldpi" />	
               <screen android:screenSize="small" android:screenDensity="mdpi" />	
               <screen android:screenSize="small" android:screenDensity="hdpi" />	
               <screen android:screenSize="small" android:screenDensity="xhdpi" />	
               <!-- all normal size screens -->	
               <screen android:screenSize="normal" android:screenDensity="ldpi" />	
               <screen android:screenSize="normal" android:screenDensity="mdpi" />	
               <screen android:screenSize="normal" android:screenDensity="hdpi" />	
               <screen android:screenSize="normal" android:screenDensity="xhdpi" />	
          </compatible-screens>	
          ...	
          <application ... >	
               ...	
          <application>	
      </manifest> 	




Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to
terms described in the Creative Commons 2.5 Attribution License.
DANKE!

Weitere Àhnliche Inhalte

Was ist angesagt?

Responsive Web Site Design
Responsive Web Site DesignResponsive Web Site Design
Responsive Web Site Design
Jussi Pohjolainen
 
What’s New in Flash Player 11.2 and Adobe AIR 3.2
What’s New in Flash Player 11.2 and Adobe AIR 3.2What’s New in Flash Player 11.2 and Adobe AIR 3.2
What’s New in Flash Player 11.2 and Adobe AIR 3.2
Joseph Labrecque
 
Mobile for the rest of us
Mobile for the rest of usMobile for the rest of us
Mobile for the rest of us
Axway Appcelerator
 
Adobe AIR Mobile development for Android and PlayBook
Adobe AIR Mobile development for Android and PlayBookAdobe AIR Mobile development for Android and PlayBook
Adobe AIR Mobile development for Android and PlayBook
Mihai Corlan
 
Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App Development
Chris Morrell
 
Android Development Tutorial V3
Android Development Tutorial   V3Android Development Tutorial   V3
Android Development Tutorial V3
Diego Torres Milano
 
Mobile applications development
Mobile applications developmentMobile applications development
Mobile applications development
Victor Matyushevskyy
 
Cross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual StudioCross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual Studio
Mizanur Sarker
 

Was ist angesagt? (20)

Responsive Web Site Design
Responsive Web Site DesignResponsive Web Site Design
Responsive Web Site Design
 
What’s New in Flash Player 11.2 and Adobe AIR 3.2
What’s New in Flash Player 11.2 and Adobe AIR 3.2What’s New in Flash Player 11.2 and Adobe AIR 3.2
What’s New in Flash Player 11.2 and Adobe AIR 3.2
 
Mobile for the rest of us
Mobile for the rest of usMobile for the rest of us
Mobile for the rest of us
 
Adobe AIR Mobile development for Android and PlayBook
Adobe AIR Mobile development for Android and PlayBookAdobe AIR Mobile development for Android and PlayBook
Adobe AIR Mobile development for Android and PlayBook
 
Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App Development
 
2012/02/15 Android 4.0 UI Design Tips@happy designer meetup
2012/02/15 Android 4.0 UI Design Tips@happy designer meetup2012/02/15 Android 4.0 UI Design Tips@happy designer meetup
2012/02/15 Android 4.0 UI Design Tips@happy designer meetup
 
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
 
Creating Mobile Content Using Flash
Creating Mobile Content Using FlashCreating Mobile Content Using Flash
Creating Mobile Content Using Flash
 
Android Development Tutorial V3
Android Development Tutorial   V3Android Development Tutorial   V3
Android Development Tutorial V3
 
Adobe AIR Development for the BlackBerry PlayBook
Adobe AIR Development for the BlackBerry PlayBookAdobe AIR Development for the BlackBerry PlayBook
Adobe AIR Development for the BlackBerry PlayBook
 
What's new in android 4.4 - Romain Guy & Chet Haase
What's new in android 4.4 - Romain Guy & Chet HaaseWhat's new in android 4.4 - Romain Guy & Chet Haase
What's new in android 4.4 - Romain Guy & Chet Haase
 
Android Accessibility - Droidcon London
Android Accessibility - Droidcon LondonAndroid Accessibility - Droidcon London
Android Accessibility - Droidcon London
 
Flash Builder and Flex Future - Multiscreen Development
Flash Builder and Flex Future - Multiscreen DevelopmentFlash Builder and Flex Future - Multiscreen Development
Flash Builder and Flex Future - Multiscreen Development
 
Getting Started with BB Development..
Getting Started with BB Development..Getting Started with BB Development..
Getting Started with BB Development..
 
High Performance Mobile Web
High Performance Mobile WebHigh Performance Mobile Web
High Performance Mobile Web
 
Mobile applications development
Mobile applications developmentMobile applications development
Mobile applications development
 
Optimizing Sites for Mobile Devices
Optimizing Sites for Mobile DevicesOptimizing Sites for Mobile Devices
Optimizing Sites for Mobile Devices
 
Cross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual StudioCross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual Studio
 
Android App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureAndroid App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structure
 
Lublin Startup Festival - Mobile Architecture Design Patterns
Lublin Startup Festival - Mobile Architecture Design PatternsLublin Startup Festival - Mobile Architecture Design Patterns
Lublin Startup Festival - Mobile Architecture Design Patterns
 

Andere mochten auch

Android Ice Cream Sandwich WJAX 2011
Android Ice Cream Sandwich WJAX 2011Android Ice Cream Sandwich WJAX 2011
Android Ice Cream Sandwich WJAX 2011
Dominik Helleberg
 
Android Enterprise Integration
Android Enterprise IntegrationAndroid Enterprise Integration
Android Enterprise Integration
Dominik Helleberg
 

Andere mochten auch (12)

Embedded Android
Embedded AndroidEmbedded Android
Embedded Android
 
Android Development Tools
Android Development ToolsAndroid Development Tools
Android Development Tools
 
Why do we need more nerds?
Why do we need more nerds?Why do we need more nerds?
Why do we need more nerds?
 
Android Ice Cream Sandwich WJAX 2011
Android Ice Cream Sandwich WJAX 2011Android Ice Cream Sandwich WJAX 2011
Android Ice Cream Sandwich WJAX 2011
 
Android Studio und gradle
Android Studio und gradleAndroid Studio und gradle
Android Studio und gradle
 
Supercharge your ui
Supercharge your uiSupercharge your ui
Supercharge your ui
 
Android Studio vs. ADT
Android Studio vs. ADTAndroid Studio vs. ADT
Android Studio vs. ADT
 
Android Development Tools
Android Development ToolsAndroid Development Tools
Android Development Tools
 
Renderscript in Android 3.x
Renderscript in Android 3.xRenderscript in Android 3.x
Renderscript in Android 3.x
 
Android Enterprise Integration
Android Enterprise IntegrationAndroid Enterprise Integration
Android Enterprise Integration
 
Core Android
Core AndroidCore Android
Core Android
 
Rich Graphics & OpenGL mit Android
Rich Graphics & OpenGL mit AndroidRich Graphics & OpenGL mit Android
Rich Graphics & OpenGL mit Android
 

Ähnlich wie One APK to rule them all

Android activity, service, and broadcast recievers
Android activity, service, and broadcast recieversAndroid activity, service, and broadcast recievers
Android activity, service, and broadcast recievers
Jagdish Gediya
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
aswapnal
 
Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9
Gustavo Fuentes Zurita
 
Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9
Gustavo Fuentes Zurita
 

Ähnlich wie One APK to rule them all (20)

Native Android Development Practices
Native Android Development PracticesNative Android Development Practices
Native Android Development Practices
 
Android activity, service, and broadcast recievers
Android activity, service, and broadcast recieversAndroid activity, service, and broadcast recievers
Android activity, service, and broadcast recievers
 
Fernando F. Gallego - Efficient Android Resources 101
Fernando F. Gallego - Efficient Android Resources 101Fernando F. Gallego - Efficient Android Resources 101
Fernando F. Gallego - Efficient Android Resources 101
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
 
Android in practice
Android in practiceAndroid in practice
Android in practice
 
Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9
 
Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9
 
Invading the home screen
Invading the home screenInvading the home screen
Invading the home screen
 
Null Dubai Humla_Romansh_Yadav_Android_app_pentesting
Null Dubai Humla_Romansh_Yadav_Android_app_pentestingNull Dubai Humla_Romansh_Yadav_Android_app_pentesting
Null Dubai Humla_Romansh_Yadav_Android_app_pentesting
 
Intro to PhoneGap and PhoneGap Build
Intro to PhoneGap and PhoneGap BuildIntro to PhoneGap and PhoneGap Build
Intro to PhoneGap and PhoneGap Build
 
Native Android Development with Spring
Native Android Development with SpringNative Android Development with Spring
Native Android Development with Spring
 
Começando com Android
Começando com AndroidComeçando com Android
Começando com Android
 
CODE BLUE 2014 : Persisted: The active use and exploitation of Microsoft's Ap...
CODE BLUE 2014 : Persisted: The active use and exploitation of Microsoft's Ap...CODE BLUE 2014 : Persisted: The active use and exploitation of Microsoft's Ap...
CODE BLUE 2014 : Persisted: The active use and exploitation of Microsoft's Ap...
 
Android N Highligts
Android N HighligtsAndroid N Highligts
Android N Highligts
 
android level 3
android level 3android level 3
android level 3
 
Android development beginners faq
Android development  beginners faqAndroid development  beginners faq
Android development beginners faq
 
Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009
 
3 Approaches to Mobile - An A to Z Primer.
3 Approaches to Mobile - An A to Z Primer.3 Approaches to Mobile - An A to Z Primer.
3 Approaches to Mobile - An A to Z Primer.
 
Deeplinking 101 - Naor Rosenberg, Quixey
Deeplinking 101 - Naor Rosenberg, QuixeyDeeplinking 101 - Naor Rosenberg, Quixey
Deeplinking 101 - Naor Rosenberg, Quixey
 
Mobile Testing with Selenium 2 by Jason Huggins
Mobile Testing with Selenium 2 by Jason HugginsMobile Testing with Selenium 2 by Jason Huggins
Mobile Testing with Selenium 2 by Jason Huggins
 

KĂŒrzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
Christopher Logan Kennedy
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

KĂŒrzlich hochgeladen (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

One APK to rule them all

  • 1. Dominik Helleberg | inovex GmbH One APK to rule them all
  • 2. Dominik Helleberg Mobile Development Android HTML5 http://dominik-helleberg.de/+ http://twitter.com/_cirrus_
  • 6. Der Android Zoo Challenging, but Android is designed to handle that!
  • 7. Getting started... Screens Resolution Screensize Density
  • 8. Screensize 2‘‘ 4‘‘ 7‘‘ 10‘‘ small normal large xlarge
  • 9. Resolution 1280x800 1280x720 320 x 240
  • 10. Density 120 160 200 300 ldpi mdpi hdpi xhdpi
  • 11. ??? Resolution Screensize Density
  • 12. DP & SP 120 160 200 300 ldpi mdpi hdpi xhdpi
  • 13.
  • 14. PX vs. DP & SP
  • 15. PX vs. DP & SP
  • 16. Layout Manager Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
  • 17. PX vs. DP & SP
  • 18. PX vs. DP & SP
  • 19. Spezialisierte Layouts layout/   layout-­‐land/   layout-­‐hdpi/   layout-­‐large-­‐land/   layout-­‐sw600dp/  
  • 20. PX vs. DP & SP
  • 21. Spezialisierte Layouts Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
  • 22.
  • 23. Ab wann ist man Tablet? layout-­‐v11/   layout-­‐land/   layout-­‐xlarge/   layout-­‐sw600dp/   layout-­‐sw720dp/    
  • 24. Activity vs. Fragment Control Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
  • 25. Activity vs. Fragment Control Tab ActionBar click Fragment Fragment Activity
  • 26. Activity vs. Fragment Control Tab ActionBar click Fragment Fragment Activity
  • 27. Android À la carte Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
  • 28. Android À la carte - APIs Intent  i  =  null;   if(android.os.Build.VERSION.SDK_INT  >=        android.os.Build.VERSION_CODES.JELLY_BEAN)   {    i  =  new  Intent(this,  JellyBeanActivity.class);   }   else    i  =  new  Intent(this,  DefaultActivity.class);  
  • 29. Android À la carte - APIs LocationUpdateRequester   LegacyUpdateRequester   FroyoUpdateRequester   GingerBread   UpdateRequester   http://code.google.com/p/android-protips-location/
  • 30. Android À la carte - APIs CompatLib   CustomImpl   Wrapper  
  • 31. Android À la carte - Ressourcen values/bools.xml   <resources> <bool name="ICS">false</bool> <bool name="preICS">true</bool> </resources>     values-­‐v14/bools.xml   <resources> <bool name="ICS">true</bool> <bool name="preICS">false</bool> </resources>    
  • 32. Android À la carte - Ressourcen <service android:name=".ICSService" android:enabled="@bool/ICS"> </service>    
  • 33. Android À la carte - Ressourcen Layout   Layout-­‐v14   Header   Header   Content   Content  
  • 34. Android À la carte - Ressourcen Layout   Layout-­‐v14       <include/>   Header   <include/>     Content   Content  
  • 35. Android À la carte - Ressourcen
  • 36. Android À la carte - Ressourcen
  • 37. Get it right - lint
  • 38. Get it right - lint
  • 39. Get it right - CI
  • 40. Get it right – Real Devices
  • 41. Fallbacks / Workarounds <uses-sdk android:minSdkVersion="8" android:targetSdkVersion=“16" /> <supports-screens .../> <compatible-screens ></compatible-screens> <uses-feature android:name="android.hardware.nfc" android:required="true"/>
  • 42. Fallbacks / Workarounds Target   Max   Sdk   Sdk   10 11-13 16
  • 43. Fallbacks / Workarounds Target   Max   Sdk   Sdk   10 11-13 16
  • 44. Fallbacks / Workarounds <supports-screens android:xlargeScreens="false" />
  • 46. Fallbacks / Workarounds <manifest ... > <supports-screens android:smallScreens="false" android:normalScreens="false" android:largeScreens="true" android:xlargeScreens="true" android:requiresSmallestWidthDp="600" /> ... <application ... > ... </application> </manifest> Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
  • 47. Fallbacks / Workarounds <manifest ... > <compatible-screens> <!-- all small size screens --> <screen android:screenSize="small" android:screenDensity="ldpi" /> <screen android:screenSize="small" android:screenDensity="mdpi" /> <screen android:screenSize="small" android:screenDensity="hdpi" /> <screen android:screenSize="small" android:screenDensity="xhdpi" /> <!-- all normal size screens --> <screen android:screenSize="normal" android:screenDensity="ldpi" /> <screen android:screenSize="normal" android:screenDensity="mdpi" /> <screen android:screenSize="normal" android:screenDensity="hdpi" /> <screen android:screenSize="normal" android:screenDensity="xhdpi" /> </compatible-screens> ... <application ... > ... <application> </manifest> Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.