SlideShare ist ein Scribd-Unternehmen logo
1 von 96
Downloaden Sie, um offline zu lesen
Android Development
201
Tomáš Kypta
Android Wear
Android Wear
• extension to Android platform
• wearable devices
Android Wear
• UI core functions
• Suggest
• Demand
Android Wear
• Suggest: The Context Stream
Android Wear
• Demand: The Cue Card
Android Wear
• Developer Preview
• Notifications
• Voice input from a notification
• Notifications with additional pages
Design Patterns
ActionBar
• dedicated piece of UI at the top of each screen
• consistent navigation
• important actions
• app identity
ActionBar
• navigation up the hierarchy
ActionBar
• can have up to 3 parts
• main action bar
• top bar (tab bar)
• bottom bar
• layout differs for portrait and
landscape
Navigation Drawer
• panel that transitions from the left edge of the
screen
• displays the app’s main navigation options
Multi-pane layouts
• many different screen sizes and types of devices
• provide balanced and aesthetically pleasing layout
Multi-pane layouts
• do not forget different orientations
• strategies
• stretch/compress
• adjust the left column width
!
!
• stack
• rearrange the panels
Multi-pane layouts
• strategies
• expand/collapse
• show only the most important
information in the left panel
!
!
• show/hide
• in portrait behave like phone
Swipe views
Swipe views
• allow efficient navigation between items
• swiping between detail views
• swiping between tabs
Swipe-to-dismiss
• dismiss list item by swiping left or right
Swipe-to-dismiss with Undo
Pull-to-refresh
• refresh list by pulling down
• different on Android and iOS
Selection
(contextual action bar)
• use long press gesture to select data
• contextual action bar is a temporary action bar
Libraries for Android
Development
Libraries
• saves time and work
• it might be painful without libraries
• back-porting new API to older Android versions
• simplifying API
Libraries
• The ideal library?
• “perform one task and perform it well”
• open-source
ActionBar
• ActionBarSherlock
• ActionBarCompat
• support-v7
Dialogs
• Why do we need a library for dialogs?
Dialogs
Dialogs
• Let’s simplify
• android-styled-dialogs
Dialogs
• android-styled-dialogs
• backports dialogs in Holo theme
• makes styling and using dialogs a piece of cake
Dialogs
Pull-to-refresh
• ActionBar-PullToRefresh
Navigation Drawer
• DrawerLayour
• support-v4
• SlidingMenu
• android-menudrawer
Swipe views
• ViewPager
• support-v4
Swipe-to-dismiss
• Android-SwipeToDismiss
• SwipeToDismissNOA
• backport to Android 2.x
• SwipeToDismissUndoList
• with undo
Networking
• OkHttp
• SPDY support
• Volley
• easier and faster networking
REST API
• retrofit
• simple REST client for Android and Java
Image loaders
• displaying images from web
Image loaders
• Volley
• NetworkImageView
• Picasso
• easy to use
• Android-Universal-Image-Loader
• powerful and flexible library
View injection
• getting rid of boilerplate code
• TextView title = (TextView)
findViewById(R.id.title);!
• Butter Knife
• @InjectView(R.id.title) TextView title;!
• can’t be used in libraries
Dependency injection
• Dagger
Event bus
• Otto
• Guava based event bus
IntelliJ IDEA plugins
• android-selector-chapek
• generates drawable selectors from appropriately
named Android resources
• android-butterknife-zelezny
• allows one-click creation of Butterknife view
injections
UI debugging
• android-grid-wichterle
• app that shows grid overlay
• helps to verify app design
UI debugging
• Scalpel
• debugging tool to uncover
the layers under our app
UI niceties
• NineOldAndroids
• backports animation API introduced in Android
3.0
• ViewPagerIndicator
• paging indicator widgets for ViewPager
UI niceties
• PagerSlidingTabStrip
Unit testing
• Roboelectric
• fest-android
• FEST assertions geared toward testing Android
Other
• Guava
Developing Libraries
Developing Libraries
• jar
• apklib
• aar
Developing Libraries
• How to publish?
Maven
Maven
• project management tool
• dependency management
Maven
• repositories
• The Central Repository
• local repository
Maven
• Configuration file
• pom.xml
Maven
• lifecycle phases
• validate
• compile
• test
• package
• install
• deploy
Maven
• android-maven-plugin
• mvn clean package android:deploy android:run
Gradle
Gradle
• new build system introduced by Google
• DSL
• dependency management through Maven and/or
Apache Ivy
ListView & EmptyView
ListView & EmptyView
• How to effectively manage list loading and empty
views?
ProGuard
ProGuard
• shrinking
• obfuscation
• optimizing
• repackaging
ProGuard
• build time
• reflection
ProGuard
• Configuration file
• proguard.cfg
ProGuard
• output files
• dump.txt
• mapping.txt
• seeds.txt
• usage.txt
ProGuard
• Decoding Obfuscated Stack Traces
• ReTrace
ProGuard
• Decoding Obfuscated Stack Traces
• retrace.sh -verbose mapping.txt
obfuscated_stacktrace.txt
Android Lint
Android Lint
• static code analysis tool
Android Lint
• Correctness
• Security
• Performance
• Usability
• Accessibility
• I18n
Android Lint
• lint path_to_my_project!
• IntelliJ IDEA / Android Studio
• Analyze > Inspect Code …
Android Lint
• lint --check HardcodedText path_to_my_project!
• lint —html lint-report.html path_to_my_project
Android Lint
• Disabling lint checking
• @SupressLint!
• tools:ignore
Android Lint
• Config file
• lint.xml
Android Lint
• custom lint rules
StrictMode
StrictMode
• developer tool for detecting accidental wrong
implementation
• detection on current thread
• detection on ony thread
Tools Attributes
Tools Attributes
• tools:ignore!
• @SuppressLint
Tools Attributes
• tools:targetApi!
• @TargetApi
Tools Attributes
• Designtime Layout Attributes
• tools:text!
• tools:visibility!
• etc.
Tools Attributes
• tools:locale
Tools Attributes
• tools:context
Tools Attributes
• tools:layout
Tools Attributes
• tools:listitem!
• tools:listheader!
• tools:listfooter
Traceview
Context
Context
• interface to global information about an application
environment
Context
• Types
• Application
• Activity/Service
• BroadcastReceiver
• ContentProvider
Context & Singletons
• Use only application context for singletons
Context & UI
• Use only activity context
THE END

Weitere ähnliche Inhalte

Was ist angesagt?

SideLang 5min Presentation @ WP TLV
SideLang 5min Presentation @ WP TLVSideLang 5min Presentation @ WP TLV
SideLang 5min Presentation @ WP TLV
dsero
 

Was ist angesagt? (15)

Cross-Platform Development
Cross-Platform DevelopmentCross-Platform Development
Cross-Platform Development
 
Tools For Mobile Web Design and App Creation
Tools For Mobile Web Design and App CreationTools For Mobile Web Design and App Creation
Tools For Mobile Web Design and App Creation
 
Creating Landing Pages for Drupal 8
Creating Landing Pages for Drupal 8Creating Landing Pages for Drupal 8
Creating Landing Pages for Drupal 8
 
Apple TV development
Apple TV developmentApple TV development
Apple TV development
 
Compose UI
Compose UICompose UI
Compose UI
 
Introduction to the Ionic Framework
Introduction to the Ionic FrameworkIntroduction to the Ionic Framework
Introduction to the Ionic Framework
 
Digital Publishing with the OSCI Toolkit - Workshop MCN 2012
Digital Publishing with the OSCI Toolkit - Workshop MCN 2012Digital Publishing with the OSCI Toolkit - Workshop MCN 2012
Digital Publishing with the OSCI Toolkit - Workshop MCN 2012
 
App forum2015 London - Building RhoMobile Applications with Ionic
App forum2015 London - Building RhoMobile Applications with IonicApp forum2015 London - Building RhoMobile Applications with Ionic
App forum2015 London - Building RhoMobile Applications with Ionic
 
Beginning jQuery Mobile
Beginning jQuery MobileBeginning jQuery Mobile
Beginning jQuery Mobile
 
Blogging Basics - Part 1
Blogging Basics - Part 1Blogging Basics - Part 1
Blogging Basics - Part 1
 
新しい技術を取り入れるための実験のやり方 〜サーバーレス・機械学習・PWAを実戦に投入するまで〜
新しい技術を取り入れるための実験のやり方 〜サーバーレス・機械学習・PWAを実戦に投入するまで〜新しい技術を取り入れるための実験のやり方 〜サーバーレス・機械学習・PWAを実戦に投入するまで〜
新しい技術を取り入れるための実験のやり方 〜サーバーレス・機械学習・PWAを実戦に投入するまで〜
 
360|Flex Recap - San Jose 2010
360|Flex Recap - San Jose 2010360|Flex Recap - San Jose 2010
360|Flex Recap - San Jose 2010
 
MAUI Blazor - One App that runs everywhere
MAUI Blazor - One App that runs everywhereMAUI Blazor - One App that runs everywhere
MAUI Blazor - One App that runs everywhere
 
SideLang 5min Presentation @ WP TLV
SideLang 5min Presentation @ WP TLVSideLang 5min Presentation @ WP TLV
SideLang 5min Presentation @ WP TLV
 
Hybrid Mobile Development with Apache Cordova,AngularJs and ionic
Hybrid Mobile Development with Apache Cordova,AngularJs and ionicHybrid Mobile Development with Apache Cordova,AngularJs and ionic
Hybrid Mobile Development with Apache Cordova,AngularJs and ionic
 

Ähnlich wie Android Development 201

【前端Mvc】mvc behind-alphatown
【前端Mvc】mvc behind-alphatown【前端Mvc】mvc behind-alphatown
【前端Mvc】mvc behind-alphatown
taobao.com
 
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There TodayHTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
davyjones
 
iOS Programming 101
iOS Programming 101iOS Programming 101
iOS Programming 101
rwenderlich
 
Rich Internet Applications and Flex - 1
Rich Internet Applications and Flex - 1Rich Internet Applications and Flex - 1
Rich Internet Applications and Flex - 1
Vijay Kalangi
 

Ähnlich wie Android Development 201 (20)

Android Libraries
Android LibrariesAndroid Libraries
Android Libraries
 
Inspect The Uninspected
Inspect The UninspectedInspect The Uninspected
Inspect The Uninspected
 
Android development - the basics, MFF UK, 2013
Android development - the basics, MFF UK, 2013Android development - the basics, MFF UK, 2013
Android development - the basics, MFF UK, 2013
 
Large Scale Drupal - Behind the Scenes
Large Scale Drupal - Behind the ScenesLarge Scale Drupal - Behind the Scenes
Large Scale Drupal - Behind the Scenes
 
A Deep Dive into Open Source Android Development
A Deep Dive into Open Source Android DevelopmentA Deep Dive into Open Source Android Development
A Deep Dive into Open Source Android Development
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
 
Drupal 8 deeper dive
Drupal 8 deeper diveDrupal 8 deeper dive
Drupal 8 deeper dive
 
Is it possible to write cross-native apps in 2020 ?
Is it possible to write cross-native apps in 2020 ?Is it possible to write cross-native apps in 2020 ?
Is it possible to write cross-native apps in 2020 ?
 
Rapid development with Rails
Rapid development with RailsRapid development with Rails
Rapid development with Rails
 
Building mobile apps with PhoneGap and Backbone
Building mobile apps with PhoneGap and BackboneBuilding mobile apps with PhoneGap and Backbone
Building mobile apps with PhoneGap and Backbone
 
Intro to Android for the iOS Fan
Intro to Android for the iOS FanIntro to Android for the iOS Fan
Intro to Android for the iOS Fan
 
Infinum android talks_10_android_libraries_used_on_daily_basis
Infinum android talks_10_android_libraries_used_on_daily_basisInfinum android talks_10_android_libraries_used_on_daily_basis
Infinum android talks_10_android_libraries_used_on_daily_basis
 
新版阿尔法城背后的前端MVC实践
新版阿尔法城背后的前端MVC实践新版阿尔法城背后的前端MVC实践
新版阿尔法城背后的前端MVC实践
 
【前端Mvc】mvc behind-alphatown
【前端Mvc】mvc behind-alphatown【前端Mvc】mvc behind-alphatown
【前端Mvc】mvc behind-alphatown
 
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There TodayHTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
 
iOS Programming 101
iOS Programming 101iOS Programming 101
iOS Programming 101
 
Rich Internet Applications and Flex - 1
Rich Internet Applications and Flex - 1Rich Internet Applications and Flex - 1
Rich Internet Applications and Flex - 1
 
Android Tutorial
Android TutorialAndroid Tutorial
Android Tutorial
 
Developing a mobile cross-platform library
Developing a mobile cross-platform libraryDeveloping a mobile cross-platform library
Developing a mobile cross-platform library
 
Building your first iOS app using Xamarin
Building your first iOS app using XamarinBuilding your first iOS app using Xamarin
Building your first iOS app using Xamarin
 

Mehr von Tomáš Kypta

Android development - the basics, FI MUNI, 2012
Android development - the basics, FI MUNI, 2012Android development - the basics, FI MUNI, 2012
Android development - the basics, FI MUNI, 2012
Tomáš Kypta
 

Mehr von Tomáš Kypta (19)

Modern Android app library stack
Modern Android app library stackModern Android app library stack
Modern Android app library stack
 
Guide to the jungle of testing frameworks
Guide to the jungle of testing frameworksGuide to the jungle of testing frameworks
Guide to the jungle of testing frameworks
 
Guide to the jungle of testing frameworks
Guide to the jungle of testing frameworksGuide to the jungle of testing frameworks
Guide to the jungle of testing frameworks
 
Practical RxJava for Android
Practical RxJava for AndroidPractical RxJava for Android
Practical RxJava for Android
 
Practical RxJava for Android
Practical RxJava for AndroidPractical RxJava for Android
Practical RxJava for Android
 
Reactive programming on Android
Reactive programming on AndroidReactive programming on Android
Reactive programming on Android
 
Android Develpment vol. 3, MFF UK, 2015
Android Develpment vol. 3, MFF UK, 2015Android Develpment vol. 3, MFF UK, 2015
Android Develpment vol. 3, MFF UK, 2015
 
Writing testable Android apps
Writing testable Android appsWriting testable Android apps
Writing testable Android apps
 
Android Develpment vol. 2, MFF UK, 2015
Android Develpment vol. 2, MFF UK, 2015Android Develpment vol. 2, MFF UK, 2015
Android Develpment vol. 2, MFF UK, 2015
 
ProGuard
ProGuardProGuard
ProGuard
 
Unit testing and Android
Unit testing and AndroidUnit testing and Android
Unit testing and Android
 
Android Development for Phone and Tablet
Android Development for Phone and TabletAndroid Development for Phone and Tablet
Android Development for Phone and Tablet
 
Reactive programming on Android
Reactive programming on AndroidReactive programming on Android
Reactive programming on Android
 
Android development - the basics, MFF UK, 2014
Android development - the basics, MFF UK, 2014Android development - the basics, MFF UK, 2014
Android development - the basics, MFF UK, 2014
 
Užitečné Android knihovny pro vývoj a testování
Užitečné Android knihovny pro vývoj a testováníUžitečné Android knihovny pro vývoj a testování
Užitečné Android knihovny pro vývoj a testování
 
Programování pro Android - úvod, FI MUNI, 2013
Programování pro Android - úvod, FI MUNI, 2013Programování pro Android - úvod, FI MUNI, 2013
Programování pro Android - úvod, FI MUNI, 2013
 
Stylování ActionBaru
Stylování ActionBaruStylování ActionBaru
Stylování ActionBaru
 
Android development - the basics, MFF UK, 2012
Android development - the basics, MFF UK, 2012Android development - the basics, MFF UK, 2012
Android development - the basics, MFF UK, 2012
 
Android development - the basics, FI MUNI, 2012
Android development - the basics, FI MUNI, 2012Android development - the basics, FI MUNI, 2012
Android development - the basics, FI MUNI, 2012
 

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
 

Kürzlich hochgeladen (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 

Android Development 201