SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Andere mochten auch

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
 

Andere mochten auch (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.)
 

Ähnlich wie Programming Android

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

Ähnlich wie 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
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

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...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
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
 
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
 
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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 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...
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Programming Android