SlideShare una empresa de Scribd logo
1 de 26
Descargar para leer sin conexión
Programming




Christopher League
30 November 2011
Links for later
●
    eclipse.org/
    Integrated Development Environment for Java
●
    developer.android.com/
    Complete developer’s guide and reference
●
    slidesha.re/soQgoZ
    These slides
●
    github.com/league/android2011/
    Source code for my sample apps
Teach Yourself Java in 21 seconds
●
    All code is in the context of a class
●
    Class can contain fields, methods, inner classes
●
    Static pertains to class itself, not every object
●
    All objects are references, and can be null
●
    Inherit and override methods from base classes
●
    Import classes from library packages
●
    The rest is mostly the same as C/C++/C#
●
    Beginners should use an IDE, such as Eclipse
Eclipse
Eclipse toolbar




Run » Run        Android SDK   Android Virtual
(Ctrl+F11)       Manager       Device Manager
AVD, AVD, wherefore art thee?
Importing an Eclipse project
●
    Download: http://bit.ly/liu-android-zip
●
    Eclipse menu: File » Import
●
    Import source: General » Existing Projects
Importing an Eclipse project
●
    Select archive file: browse to downloaded
    league-liu-android-blahblah.zip
●
    Select all; Finish
open FloodPuz » FloodPuzActivity
Run, select device
Check progress in console
Check progress in console
Activities
●
    Roughly:
    each UI screen
    in your app
    is an activity
Activities
●
    Multiple activities sequenced using back stack
Layouts, views, & widgets
Layouts, views, & widgets
Event-based programming

:
:
Starting a new project
●
    File » New » Project
●
    Android » Android Project (Next)
●
    Project name: MyApp (Next)
●
    Target: Android 4.0 (Next)
●
    Package name: net.liucs (Next)
●
    Finish
Initial files
XML Layout editor
XML Layout editor
●
    Drag a button onto the layout
●
    Right-click “hello” text, edit ID
Access widgets in Java code



          Source » Organize Imports
          (Ctrl+Shift+O) to fix
Access widgets in Java code




Or, get this code at
https://gist.github.com/1410641
Next steps
●
    Try to extend my projects, especially SketchBot
●
    Additional colors
●
    Draw shapes instead of just lines
●
    Save drawing across application switch
Docs are your friends

Más contenido relacionado

Destacado

Modular Module Systems
Modular Module SystemsModular Module Systems
Modular Module Systems
league
 
Becta next generation conference 2010
Becta next generation conference 2010Becta next generation conference 2010
Becta next generation conference 2010
Zak Mensah
 

Destacado (7)

Benefits of using digital media for training
Benefits of using digital media for trainingBenefits of using digital media for training
Benefits of using digital media for training
 
using digital media @ Leicester college
using digital media @ Leicester collegeusing digital media @ Leicester college
using digital media @ Leicester college
 
Establishing the digital City limits
Establishing the digital City limitsEstablishing the digital City limits
Establishing the digital City limits
 
Modular Module Systems
Modular Module SystemsModular Module Systems
Modular Module Systems
 
Merits of good design - Plymouth e-learning conference
Merits of good design - Plymouth e-learning conference Merits of good design - Plymouth e-learning conference
Merits of good design - Plymouth e-learning conference
 
Becta next generation conference 2010
Becta next generation conference 2010Becta next generation conference 2010
Becta next generation conference 2010
 
Futzing with actors (etc.)
Futzing with actors (etc.)Futzing with actors (etc.)
Futzing with actors (etc.)
 

Similar a Programming Android

Android application development
Android application developmentAndroid application development
Android application development
slidesuren
 

Similar a Programming Android (20)

Clojure.tokyo.descjop
Clojure.tokyo.descjopClojure.tokyo.descjop
Clojure.tokyo.descjop
 
Android session 1
Android session 1Android session 1
Android session 1
 
Code-Hub
Code-HubCode-Hub
Code-Hub
 
Android studio
Android studioAndroid studio
Android studio
 
Voxxed days Vilnius 2015 - Android Reverse Engineering Lab
Voxxed days Vilnius 2015 - Android Reverse Engineering LabVoxxed days Vilnius 2015 - Android Reverse Engineering Lab
Voxxed days Vilnius 2015 - Android Reverse Engineering Lab
 
Android App development I
Android App development IAndroid App development I
Android App development I
 
Akashdeepsinghjandu13
Akashdeepsinghjandu13Akashdeepsinghjandu13
Akashdeepsinghjandu13
 
Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3
 
Electron JS | Build cross-platform desktop applications with web technologies
Electron JS | Build cross-platform desktop applications with web technologiesElectron JS | Build cross-platform desktop applications with web technologies
Electron JS | Build cross-platform desktop applications with web technologies
 
NDK Introduction
NDK IntroductionNDK Introduction
NDK Introduction
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Java
 
Android application development
Android application developmentAndroid application development
Android application development
 
Android ndk - Introduction
Android ndk  - IntroductionAndroid ndk  - Introduction
Android ndk - Introduction
 
Android NDK
Android NDKAndroid NDK
Android NDK
 
React native: building native iOS apps with javascript
React native: building native iOS apps with javascriptReact native: building native iOS apps with javascript
React native: building native iOS apps with javascript
 
Android
AndroidAndroid
Android
 
Android - Android Application Configuration
Android - Android Application ConfigurationAndroid - Android Application Configuration
Android - Android Application Configuration
 
Android ndk
Android ndkAndroid ndk
Android ndk
 
Eclipse introduction IDE PRESENTATION
Eclipse introduction IDE PRESENTATIONEclipse introduction IDE PRESENTATION
Eclipse introduction IDE PRESENTATION
 
AndEngine
AndEngineAndEngine
AndEngine
 

Último

Último (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
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...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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?
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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)
 

Programming Android