Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Android Development Essentials

Ce5b219b385d3e316a553d8a41900ed9?s=47 Annyce D.
December 11, 2019

Android Development Essentials

Explore the world of Android app development. This talk will prepare you to create your very first Android app.

You’ll learn about:
* Android Studio, the preferred IDE for creating Android apps,
* The Android emulator, software designed to mimic a real device,
* The different files in a typical Android app,
* And finally, you’ll learn how an app is built from the bottom up

This talk is designed to provide you with everything you need to know to understand the Android development process. Let’s get started!

Ce5b219b385d3e316a553d8a41900ed9?s=128

Annyce D.

December 11, 2019
Tweet

More Decks by Annyce D.

Other Decks in Programming

Transcript

  1. Android Development Essentials Annyce Davis - @brwngrldev

  2. @brwngrldev What comes to mind…

  3. @brwngrldev ANDROID

  4. https://blog.google/products/android/2bn-milestone

  5. @brwngrldev Foundational knowledge

  6. @brwngrldev Foundational knowledge • Programming basics

  7. @brwngrldev Foundational knowledge • Programming basics • Object-oriented design

  8. @brwngrldev Foundational knowledge • Programming basics • Object-oriented design •

    JVM-based language
  9. @brwngrldev Foundational knowledge • Programming basics • Object-oriented design •

    JVM-based language • XML
  10. @brwngrldev App development…

  11. @brwngrldev App development… Display screen to user

  12. @brwngrldev App development… Display screen to user Handle user’s action

  13. @brwngrldev App development… Display screen to user Handle user’s action

    M ake API request
  14. @brwngrldev Display screen to user Handle user’s action M ake

    API request App development…
  15. @brwngrldev App development…

  16. @brwngrldev Sources of complexity

  17. @brwngrldev Sources of complexity • Multiple versions of Android

  18. @brwngrldev Sources of complexity • Multiple versions of Android •

    Variety of devices
  19. @brwngrldev Sources of complexity • Multiple versions of Android •

    Variety of devices • Physical size
  20. @brwngrldev Sources of complexity • Multiple versions of Android •

    Variety of devices • Physical size • Pixel density
  21. @brwngrldev Sources of complexity • Multiple versions of Android •

    Variety of devices • Physical size • Pixel density • Manufacturer’s custom software
  22. Sample app github.com/adavis/puppy-tracker @brwngrldev

  23. @brwngrldev Android Studio

  24. @brwngrldev Android Studio

  25. @brwngrldev • Code editor Android Studio

  26. @brwngrldev • Code editor • Visual layout editor Android Studio

  27. @brwngrldev • Code editor • Visual layout editor • Gradle

    build system Android Studio
  28. @brwngrldev • Code editor • Visual layout editor • Gradle

    build system • Debugging tools Android Studio
  29. Demo @brwngrldev

  30. @brwngrldev Android App File Structure

  31. @brwngrldev File structure

  32. @brwngrldev • Source code File structure

  33. @brwngrldev • Source code • Graphics File structure

  34. @brwngrldev • Source code • Graphics • Resources File structure

  35. Demo @brwngrldev

  36. @brwngrldev Android App Components

  37. @brwngrldev

  38. @brwngrldev Activity

  39. @brwngrldev Activity Fragment

  40. @brwngrldev Activity Fragment Widget

  41. package info.adavis.puppytracker import android.os.Bundle import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity()

    { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) if (savedInstanceState == null) { supportFragmentManager.beginTransaction() .replace(R.id.container, MainFragment.newInstance()) .commitNow() } } } @brwngrldev
  42. package info.adavis.puppytracker import android.os.Bundle import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity()

    { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) if (savedInstanceState == null) { supportFragmentManager.beginTransaction() .replace(R.id.container, MainFragment.newInstance()) .commitNow() } } } @brwngrldev
  43. package info.adavis.puppytracker import android.os.Bundle import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity()

    { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) if (savedInstanceState == null) { supportFragmentManager.beginTransaction() .replace(R.id.container, MainFragment.newInstance()) .commitNow() } } } @brwngrldev
  44. class MainFragment : Fragment() { override fun onCreateView( inflater: LayoutInflater,

    container: ViewGroup?, savedInstanceState: Bundle? ): View? { return inflater.inflate(R.layout.fragment_main, container, false) } … @brwngrldev
  45. class MainFragment : Fragment() { override fun onCreateView( inflater: LayoutInflater,

    container: ViewGroup?, savedInstanceState: Bundle? ): View? { return inflater.inflate(R.layout.fragment_main, container, false) } … @brwngrldev
  46. None
  47. None
  48. Sample app code github.com/adavis/puppy-tracker @brwngrldev