Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Android Programming with Kotlin for Beginners

You're reading from  Android Programming with Kotlin for Beginners

Product type Book
Published in Apr 2019
Publisher Packt
ISBN-13 9781789615401
Pages 698 pages
Edition 1st Edition
Languages
Author (1):
John Horton John Horton
Profile icon John Horton
Toc

Table of Contents (33) Chapters close

Android Programming with Kotlin for Beginners
Contributors
Preface
1. Getting Started with Android and Kotlin 2. Kotlin, XML, and the UI Designer 3. Exploring Android Studio and the Project Structure 4. Getting Started with Layouts and Material Design 5. Beautiful Layouts with CardView and ScrollView 6. The Android Lifecycle 7. Kotlin Variables, Operators, and Expressions 8. Kotlin Decisions and Loops 9. Kotlin Functions 10. Object-Oriented Programming 11. Inheritance in Kotlin 12. Connecting Our Kotlin to the UI and Nullability 13. Bringing Android Widgets to Life 14. Android Dialog Windows 15. Handling Data and Generating Random Numbers 16. Adapters and Recyclers 17. Data Persistence and Sharing 18. Localization 19. Animations and Interpolations 20. Drawing Graphics 21. Threads and Starting the Live Drawing App 22. Particle Systems and Handling Screen Touches 23. Android Sound Effects and the Spinner Widget 24. Design Patterns, Multiple Layouts, and Fragments 25. Advanced UI with Paging and Swiping 26. Advanced UI with Navigation Drawer and Fragment 27. Android Databases 28. A Quick Chat Before You Go Other Book You May Enjoy Index

Index

A

  • abstract classes / Abstract classes and functions
  • abstract function / Abstract classes and functions
  • Activity / ImageView and Activity
  • Activity class instances / The manifests folder
  • activity_main.xml file / The activity_main.xml file
  • adapter / The solution to the problem with displaying lots of widgets
  • adapters / The Note to self app
  • adaptive icons
    • reference link / The res/drawable folder
  • addition operator / The addition operator
  • advanced persistence
    • about / More advanced persistence
    • JavaScript Object Notation (JSON) / What is JSON?
    • exceptions / Exceptions – try, catch, and finally
  • Age Database app
    • examining / Examining the Age Database app
    • insert option / Insert
    • delete option / Delete
    • search option / Search
    • results option / Results
    • executing / Running the Age Database app
  • Age Database project
    • initiating / Starting the Age Database project
  • alpha, red, green, and blue (ARGB) / Changing color
  • Android
    • using / Why use Kotlin and Android?
    • working / How Kotlin and Android work together
    • executing / Run that by me again – what, exactly, is Android?
    • animations / Animations in Android
    • coordinate system / The Android coordinate system
    • coordinates, plotting / Plotting and drawing
    • coordinates, drawing / Plotting and drawing
  • Android API / The Android API
  • Android app / What makes an Android app?
    • steps / Our first Android app, Possible extra step 1, Possible extra step 2
    • deploying / Deploying the app so far
    • debugging, on Andriod emulator / Running and debugging the app on an Android emulator
    • executing, on Andriod emulator / Running and debugging the app on an Android emulator
    • executing, on real device / Running the app on a real device
    • about / The life and times of an Android app
    • interacting / How Android interacts with our apps
  • Android application package (APK) / Run that by me again – what, exactly, is Android?
  • Android code
    • structure / The structure of Android's code
    • package / Packages
    • classes / Classes
    • functions / Functions
  • Android design guidelines / Android design guidelines
  • Android developer site
    • reference link / Configuration qualifiers
  • Android emulator
    • exploring / Exploring the Android emulator
    • control panel / The emulator control panel
    • used, as real device / Using the emulator as a real device
    • app drawer, accessing / Accessing the app drawer
    • active apps, viewing / Viewing active apps and switching between apps
    • apps, switching between / Viewing active apps and switching between apps
  • Android Intent class
    • about / The Android Intent class
    • Activity, switching / Switching Activity
    • data, passing between activities / Passing data between Activities
  • Android lifecycle
    • about / A simplified explanation of the Android lifecycle
    • phases, demystified / The lifecycle phases demystified
    • phases, handling / How we handle the lifecycle phases
    • demo app / The lifecycle demo app
    • demo app, coding / Coding the lifecycle demo app
    • demo app, executing / Running the lifecycle demo app
    • demo app output, executing / Examining the lifecycle demo app output
  • Android project
    • anatomy / Project Explorer and project anatomy
    • explorer / Project Explorer and project anatomy
    • Empty Activity project / The Empty Activity project
  • Android resources / Android resources
  • Android SQLite API
    • about / The Android SQLite API
    • SQLiteOpenHelper / SQLiteOpenHelper and SQLiteDatabase
    • SQLiteDatabase / SQLiteOpenHelper and SQLiteDatabase
    • queries, building / Building and executing queries
    • queries, executing / Building and executing queries
    • database cursors / Database cursors
  • Android Studio / Android Studio, A quick guided tour of Android Studio
    • setting up / Setting up Android Studio
    • steps / Final step – for now
    • code folding / Code folding (hiding) in Android Studio
  • Android Studio theme designer
    • using / Using the Android Studio theme designer
  • Android time zone codes
    • reference link / Coding the RadioButton widgets
  • Android UI design
    • exploring / Exploring Android UI design
  • Android UI elements / All the Android UI elements are classes too
    • trash / A quick break to throw out the trash
    • Stack / Seven useful facts about the Stack and the Heap
    • Heap / Seven useful facts about the Stack and the Heap, So, how does this Heap thing help me?
  • Android user forums / Android user forums
  • animations
    • in Android / Animations in Android
    • designing, in XML / Designing cool animations in XML
    • fading in / Fading in and out
    • fading out / Fading in and out
    • object, moving / Move it, move it
    • scaling / Scaling or stretching
    • stretching / Scaling or stretching
    • duration, controlling / Controlling the duration
    • rotating / Rotate animations
    • repeating / Repeating animations
    • combining, with sets / Combining an animation's properties with sets
    • instantiating, with Kotlin code / Instantiating animations and controlling them with Kotlin code
    • controlling, with Kotlin code / Instantiating animations and controlling them with Kotlin code
    • features / More animation features
    • listeners / Listeners
    • interpolators / Animation interpolators
    • demo app / Animations demo app – introducing SeekBar
    • demo app, layingout / Laying out the animation demo
    • XML animations, coding / Coding the XML animations
    • demo app, wiring up in Kotlin / Wiring up the Animation demo app in Kotlin
  • app
    • creating / Making an app!
  • application logic / Controller
  • application programming interface (API) / How Kotlin and Android work together
  • ArrayList
    • about / ArrayLists
    • polymorphic / Arrays and ArrayLists are polymorphic
    • adding, to Note to Self project / Adding RecyclerView, RecyclerAdapter, and ArrayList to the Note to Self project
  • array object / Arrays are objects
  • Arrays
    • polymorphic / Arrays and ArrayLists are polymorphic
  • assignment operator / The assignment operator
  • attributes / UI layout elements
    • summary / Attributes – a quick summary
    • sizing, density-independent pixels (dp) used / Sizing using dp
    • fonts sizing, scalable pixels (sp) used / Sizing fonts using sp
    • size, determining with wrap or match / Determining size with wrap or match
    • padding, used / Using padding and margin
    • margin, used / Using padding and margin
    • layout_weight property, used / Using the layout_weight property
    • gravity, used / Using gravity
  • auto-generated assets
    • exploring / Exploring the auto-generated code and assets
  • auto-generated code
    • exploring / Exploring the auto-generated code and assets

B

  • backing field / Class variables are properties
  • base class / Using inheritance with open classes
  • Basic Activity project
    • about / The Basic Activity project
    • exploring / Exploring the Basic Activity project
    • MainActivity.kt file / The MainActivity.kt file
    • activity_main.xml file / The activity_main.xml file
    • MainActivity.kt file, functions / The extra functions in MainActivity.kt
    • content_main.xml file / The content_main.xml file
  • Bitmap
    • drawing / Getting started drawing with Bitmap, Canvas, and ImageView
    • about / Canvas and Bitmap
    • summary / Canvas, Bitmap, Paint, and ImageView – a quick summary
  • bitmap
    • manipulating / Manipulating bitmaps
    • about / What is a bitmap?
    • Matrix class / The Matrix class
    • demo app, manipulating / The Bitmap manipulation demo app
    • Bob graphic, adding to project / Adding the Bob graphic to the project
  • bitmap graphics
    • creating, with Bitmap class / Creating bitmap graphics with the Bitmap class
  • button attributes
    • editing / Editing the button's attributes
  • buttons
    • used, from layout / Using buttons and TextView widgets from our layout with a little help from interfaces

C

  • camel casing / Variables
  • Canvas
    • drawing / Getting started drawing with Bitmap, Canvas, and ImageView
    • about / Canvas and Bitmap
    • summary / Canvas, Bitmap, Paint, and ImageView – a quick summary
    • demo app / The Canvas Demo app
    • project, creating / Creating a new project
    • demo app, coading / Coding the Canvas demo app
    • Bitmap initialization, exploring / Exploring the Bitmap initialization
    • screen, drawing / Drawing on the screen
    • Color.argb, explaining / Explaining Color.argb
  • Canvas class / Understanding the Canvas class
    • using / Using the Canvas class
    • instances, preparing of required classes / Preparing the instances of the required classes
    • objects, initializing / Initializing the objects
    • Activity content, setting / Setting the Activity content
  • CardView
    • used, for building user interface (UI) / Building a UI with CardView and ScrollView
  • chaining
    • used, for configuring DialogFragment class / Using chaining to configure the DialogFragment class
  • CheckBox widget / The CheckBox widget
    • coding / Coding the CheckBox widget
    • size, changing / Changing size
  • child / UI layout elements
  • child class / Using inheritance with open classes
  • class / Kotlin is object-oriented
  • class declaration / The class declaration
  • classes / Classes, The structure of Kotlin code – revisited
    • importing / Importing classes
    • about / Basic classes
    • declaring / Declaring a class
    • instantiating / Instantiating a class
    • functions / Classes have functions and variables (kind of)
    • variables / Classes have functions and variables (kind of)
    • variables, using / Using the variables of a class, Using the functions and variables of a class
    • functions, using / Using the functions and variables of a class
    • variables, properties / Class variables are properties
    • properties example, with getters / Examples using properties with their getters, setters, and fields
    • properties example, with setters / Examples using properties with their getters, setters, and fields
    • properties example, with fields / Examples using properties with their getters, setters, and fields
    • overridden getters, using / When to use overridden getters and setters
    • overridden setters, using / When to use overridden getters and setters
    • used, for inheritance app example / Classes using the Inheritance example app
  • classes app / Basic classes app and using the init block
  • class recap / Class recap
  • code comments / More on code comments
  • code files
    • obtaining, for Note to self app / How to get the code files for the Note to self app
  • color
    • changing / Changing color
  • colors.xml file / The colors.xml file
  • comparison operator / The comparison operator
  • compiling / How Kotlin and Android work together
  • completed app
    • features / The completed app
  • configuration qualifiers
    • about / Configuration qualifiers
    • limitation / The limitation of configuration qualifiers
  • console / Examining the log output
  • ConstraintLayout
    • layout, converting to / Converting layouts to ConstraintLayout
  • constructor
    • about / Constructors
    • primary constructor / Primary constructors
    • secondary constructor / Secondary constructors
    • init block / Init blocks
  • content_main.xml file / The content_main.xml file
  • control flow statements / Repeating code with loops
  • controller / Controller
  • custom buttons
    • adding, to screen / Adding custom buttons to the screen

D

  • Dalvik EXecutable (DEX) / How Kotlin and Android work together
  • data / Functions
    • laying out, with TableLayout / Laying out data with TableLayout
    • handling, with arrays / Handling large amounts of data with arrays
    • array object / Arrays are objects
    • persisting, with SharedPreferences / Persisting data with SharedPreferences
  • database / What is a database?
  • database 101 / Database 101
  • database class
    • coding / Coding the database class
  • DataManager class
    • used, for coding Fragment classes / Coding the Fragment classes to use the DataManager class
  • de-serialization / More advanced persistence
  • deadlock / Problems with threads
  • declaration / The basic function declaration
  • decrement operator / The decrement operator
  • default parameter / Default and named arguments
  • density-independent pixels (dp) / Sizing using dp
  • development environment / Android Studio
  • device detection mini app / Device detection mini app
    • MainActivity class, coding / Coding the MainActivity class
    • executing / Running the app
  • dialog boxes
    • coding / Coding the dialog boxes
  • dialog demo project
    • creating / Creating the dialog demo project
  • dialog designs
    • implementing / Implementing the dialog designs
  • DialogFragment class
    • coding / Coding a DialogFragment class
    • configure, chaining used / Using chaining to configure the DialogFragment class
    • using / Using the DialogFragment class
  • DialogNewNote class
    • coding / Coding the DialogNewNote class
  • dialogs
    • displaying / Showing and using our new dialogs
    • using / Showing and using our new dialogs
  • DialogShowNote class
    • coding / Coding the DialogShowNote class
  • dialog window / Dialog windows
  • different forms / Polymorphism
  • division operator / The division operator
  • do-while loops / do-while loops
  • dots-per-inch (dpi) / The res/mipmap folder
  • dot syntax / Using the variables of a class
  • draw function / Understanding the draw function and the SurfaceView class
  • dynamic array
    • about / Getting dynamic with arrays
    • example / A dynamic array example

E

  • EditText widget / The EditText widget
  • else operators
    • using / Else do this instead
  • Empty Activity project
    • about / The Empty Activity project
    • exploring / Exploring the Empty Activity project
    • manifests folder / The manifests folder
    • java folder / The java folder
    • res folder / The res folder
    • res/drawable folder / The res/drawable folder
    • res/layout folder / The res/layout folder
    • res/mipmap folder / The res/mipmap folder
    • res/values folder / The res/values folder
  • encapsulation / What is OOP exactly?, Encapsulation
  • exceptions / Exceptions – try, catch, and finally
  • expressions / Saving keystrokes with type inference
    • about / Operators and expressions
    • assignment operator / The assignment operator
    • addition operator / The addition operator
    • subtraction operator / The subtraction operator
    • division operator / The division operator
    • multiplication operator / The multiplication operator
    • increment operator / The increment operator
    • decrement operator / The decrement operator
  • express yourself demo app / The express yourself demo app
  • Extensible Markup Language (XML) / Android resources

F

  • field / Class variables are properties
  • final class / Using inheritance with open classes
  • floating action button
    • coding / Coding the floating action button
  • folding / Code folding (hiding) in Android Studio
  • for loop / For loops
  • fragment app / Our first fragment app
  • Fragment classes
    • coding / Coding the Fragment classes and their layouts, Coding the classes
    • empty files, creating / Creating the empty files for the classes and layouts
    • content_insert.xml, designing / Designing content_insert.xml
    • content_delete.xml, designing / Designing content_delete.xml
    • content_search.xml, designing / Designing content_search.xml
    • content_results.xml, designing / Designing content_results.xml
    • using / Using the Fragment classes and their layouts
    • coding, DataManager class used / Coding the Fragment classes to use the DataManager class
  • Fragment layouts
    • coding / Coding the Fragment classes and their layouts
    • empty files, creating / Creating the empty files for the classes and layouts
    • designing / Designing the layouts
    • using / Using the Fragment classes and their layouts
    • navigation drawer menu, editing / Editing the navigation drawer menu
    • holder, adding / Adding a holder to the main layout
    • MainActivity.kt file, coding / Coding the MainActivity.kt file
  • fragment lifecycle
    • reference link / The onStart, onPause, and onStop functions
  • Fragment Pager/slider app
    • building / Building a Fragment Pager/slider app
    • SimpleFragment class, coding / Coding the SimpleFragment class
    • fragment_layout / The fragment_layout
    • MainActivity class, coding / Coding the MainActivity class, The activity_main layout
    • fragment slider app, executing / Running the fragment slider app
  • fragment reality check / Fragment reality check
  • fragments
    • about / The limitation of configuration qualifiers, Fragments
    • lifecycle / Fragments have a life cycle too
    • onCreate function / The onCreate function
    • onCreateView function / The onCreateView function
    • onAttach function / The onAttach and onDetach functions
    • onDetach function / The onAttach and onDetach functions
    • onStop function / The onStart, onPause, and onStop functions
    • onStart function / The onStart, onPause, and onStop functions
    • onPause function / The onStart, onPause, and onStop functions
    • managing, with FragmentManager / Managing fragments with FragmentManager
  • function
    • basics / Function basics and recap
    • recap / Function basics and recap
    • declaration / The basic function declaration
    • parameter lists / Function parameter lists
    • return type / The return type and the return keyword
    • return keyword / The return type and the return keyword
    • bodies / Function bodies and single-expression functions
    • single-expression functions / Function bodies and single-expression functions
    • flexibly, creating / Making functions flexible
    • default parameter / Default and named arguments
    • named arguments / Default and named arguments
    • about / Even more on functions
  • function body / The basic function declaration
  • function calling / Functions inside the class
  • function name / Functions inside the class
  • functions / Functions
    • in class / Functions inside the class
  • function signature / Functions inside the class

G

  • game loop / Coding the LiveDrawingView class, The game loop
    • implementing, with thread / Implementing the game loop with a thread
    • Runnable, implementing / Implementing Runnable and providing the run function
    • run function, providing / Implementing Runnable and providing the run function
    • run function, coding / Coding the run function
  • garbage collects / A quick break to throw out the trash
  • getters / Class variables are properties
  • GitHub / GitHub
  • graphical mask / The res/drawable folder
  • gravity / Using gravity
  • greater than operator / The greater-than operator
  • greater than or equal to operator / The greater-than-or-equal-to operator

H

  • hardcoding / The strings.xml file
  • hashing / Hashmaps
  • Hashmaps / Hashmaps
  • Heads Up Display (HUD) / Adding the printDebuggingText function
  • Heap / Seven useful facts about the Stack and the Heap, So, how does this Heap thing help me?
  • hex colours / The colors.xml file
  • higher-level study / Higher-level study

I

  • identifier / Passing data between Activities
  • if expression
    • using / Using the if expression
  • if operators
    • using / If they come over the bridge, shoot them!
  • image gallery/slider app
    • building / Building an image gallery/slider app
    • layout, implementing / Implementing the layout
    • PagerAdapter class, coding / Coding the PagerAdapter class
    • MainActivity class, coding / Coding the MainActivity class
    • gallery app, executing / Running the gallery app
  • ImageView / ImageView and Activity
    • drawing / Getting started drawing with Bitmap, Canvas, and ImageView
    • summary / Canvas, Bitmap, Paint, and ImageView – a quick summary
  • ImageView widget / The ImageView widget
  • immutable / Declaring and initializing variables
  • increment operator / The increment operator
  • infinite loop / while loops
  • inflated / All the Android UI elements are classes too
  • inheritance / What is OOP exactly?, Inheritance
    • about / OOP and inheritance
    • used, with open classes / Using inheritance with open classes
    • examples / Basic inheritance examples
    • overriding functions / Overriding functions
    • summary / Summary so far
    • app example, classes used / Classes using the Inheritance example app
  • init block
    • using / Basic classes app and using the init block
  • inner class / Inner classes
  • instance / Kotlin is object-oriented, What is OOP exactly?
  • integrated development environment (IDE) / Android Studio
  • interface / The Android API
  • interpolators / More animation features, Animation interpolators

J

  • java folder / The java folder
  • JavaScript Object Notation (JSON) / What is JSON?

K

  • key-value pair / Hashmaps
  • key-value pairs / Passing data between Activities
  • keystrokes
    • saving, with type inference / Saving keystrokes with type inference
  • keywords / Learning the jargon
  • Kotlin
    • using / Why use Kotlin and Android?
    • working / How Kotlin and Android work together
    • object-oriented / Kotlin is object-oriented
    • reference / Learning the jargon
    • decisions, creating / Making decisions in Kotlin
    • code, indenting for clarity / Indenting code for clarity
  • Kotlin array / Handling large amounts of data with arrays
  • Kotlin code
    • exploring / Exploring the project's Kotlin code and the main layout's XML code
    • summary / A summary of the Kotlin code so far
    • comments, leaving / Leaving comments in our Kotlin code
    • writing / Writing our first Kotlin code
    • UI, wiring up with / Wiring up the UI with the Kotlin code (part 1), Wiring up the UI with the Kotlin code (part 2)
    • structure / The structure of Kotlin code – revisited
  • Kotlin companion object / Kotlin companion objects
  • Kotlin functions
    • writing / Writing our own Kotlin functions
  • Kotlin interfaces / Kotlin interfaces
  • Kotlin operators
    • about / More Kotlin operators
    • comparison operator / The comparison operator
    • logical NOT operator / The logical NOT operator
    • NOT equal operator / The NOT equal operator
    • greater than operator / The greater-than operator
    • less than operator / The less-than operator
    • greater than or equal to operator / The greater-than-or-equal-to operator
    • less than or equal to operator / The less-than-or-equal-to operator
    • logical AND operator / The logical AND operator
    • logical OR operator / The logical OR operator
    • used, to test variables / How to use all these operators to test variables
    • if expression, using / Using the if expression
    • if operators, using / If they come over the bridge, shoot them!
    • else operators, using / Else do this instead
    • decision, creating / Using when to make decisions
    • When Demo app / The When Demo app
  • Kotlin syntax / Learning the jargon

L

  • lambdas
    • about / RadioButtons and RadioGroups, Lambdas
    • code, writing for overridden function / Writing the code for the overridden function
  • layers / Introducing the model-view-controller pattern
  • layout
    • converting, to ConstraintLayout / Converting layouts to ConstraintLayout
  • layout file
    • examining / Examining the main layout file
    • buttons, adding / Adding buttons to the main layout file
    • buttons, adding via visual designer / Adding a button via the visual designer
    • XML code, examining for button / Examining the XML code for the new button
    • button, adding by editing XML code / Adding a button by editing the XML code
    • button, id attributes / Giving the buttons unique id attributes
    • button, positioning in layout / Positioning the two buttons in the layout
    • button, creating for calling functions / Making the buttons call different functions
  • layouts
    • about / Layouts
    • adding, within layouts / Adding layouts within layouts
    • enhancing / Making the layout look pretty
  • Layouts project
    • creating / Creating the Exploring Layouts project
    • exploring / Creating the Exploring Layouts project
  • learning
    • carrying / Carrying on learning
  • less than operator / The less-than operator
  • less than or equal to operator / The less-than-or-equal-to operator
  • LinearLayout
    • menu, building / Building a menu with LinearLayout
    • adding, to project / Adding a LinearLayout to the project
    • workspace, preparing / Preparing your workspace
    • generated XML, generating / Examining the generated XML
    • TextView, adding to UI / Adding a TextView to the UI
    • multi-line TextView, adding to UI / Adding a multi-line TextView to the UI
  • live drawing app
    • executing / Running the app
  • Live Drawing app / Looking ahead at the Live Drawing app
    • MainActivity / Looking ahead at the Live Drawing app
    • LiveDrawingView / Looking ahead at the Live Drawing app
    • ParticleSystem / Looking ahead at the Live Drawing app
    • Particle / Looking ahead at the Live Drawing app
    • executing / Running the app
  • Live Drawing project
    • creating / Creating the Live Drawing project
  • LiveDrawingView class
    • coding / Coding the LiveDrawingView class
    • properties, adding / Adding the properties
    • draw function, coding / Coding the draw function
  • locking / Problems with threads
  • logcat / Examining the log output
  • logcat output
    • filtering / Filtering the logcat output
  • logical AND operator / The logical AND operator
  • logical NOT operator / The logical NOT operator
  • logical OR operator / The logical OR operator
  • log output
    • examining / Examining the log output
  • loop
    • code, repeating / Repeating code with loops
    • about / Repeating code with loops
    • controlling, with break and continue / Controlling loops with break and continue

M

  • MainActivity.kt file / The MainActivity.kt file
    • examining / Examining the MainActivity.kt file
    • functions / The extra functions in MainActivity.kt
  • MainActivity class
    • coding / Coding the MainActivity class
  • manifests folder / The manifests folder
  • margin / Using padding and margin
  • material design
    • about / Material design, Themes and material design
    • reference link / Themes and material design
  • Matrix class
    • about / The Matrix class
    • bitmap, inverting to opposite direction / Inverting a bitmap to face the opposite direction
    • bitmap, rotating to face up and down / Rotating the bitmap to face up and down
  • meeting class
    • using / Using the Meeting class
  • menu
    • building, with LinearLayout / Building a menu with LinearLayout
  • message code
    • adding, to onCreate function / Adding message code to the onCreate function
  • messages
    • coding, to user / Coding messages to the user and the developer
    • coding, to developer / Coding messages to the user and the developer
  • method / Function basics and recap, Using buttons and TextView widgets from our layout with a little help from interfaces
  • mini-app array
    • example / A simple mini-app array example
  • model / Model
  • model-view-controller pattern / Introducing the model-view-controller pattern
  • multiplication operator / The multiplication operator
  • mutable / Declaring and initializing variables
  • myList / ArrayLists

N

  • named argument / Default and named arguments
  • naming convention / Variables
  • NavigationView / Introducing the NavigationView
  • nesting / Adding layouts within layouts
  • non-null assertion / Non null assertion
  • Note class
    • coding / Coding the Note class
  • Notepad++
    • reference link / Writing our own Kotlin functions
  • NOT equal operator / The NOT equal operator
  • Note to self
    • settings page, adding / Adding a settings page to Note to self
    • SettingsActivity, creating / Creating the SettingsActivity
    • settings screen layout, designing / Designing the settings screen layout
    • user, enabling to switch settings screen / Enabling the user to switch to the "Settings" screen
    • user data, backing up / Backing up user data in Note to self
  • Note to self app / The Note to self app
    • project, building / Building the project
    • about / The Note to self app
    • language support / Making the Note to self app Spanish, English, and German
    • Spanish support / Adding Spanish support
    • German support, adding / Adding German support
    • string resources, adding / Adding the String resources
    • executing, in Germain support / Running Note to self in German or Spanish
    • executing, in Spanish support / Running Note to self in German or Spanish
    • translations, creating in Kotlin code / Making the translations work in Kotlin code
  • Note to Self project
    • ArrayList, adding / Adding RecyclerView, RecyclerAdapter, and ArrayList to the Note to Self project
    • RecyclerView, adding / Adding RecyclerView, RecyclerAdapter, and ArrayList to the Note to Self project
    • RecyclerAdapter, adding / Adding RecyclerView, RecyclerAdapter, and ArrayList to the Note to Self project
  • Note to self settings persist
    • creating / Making the Note to self settings persist
    • SettingsActivity class, coding / Coding the SettingsActivity class
    • MainActivity class, coding / Coding the MainActivity class
  • nullability
    • var revisited / Nullability – val and var revisited
    • val revisited / Nullability – val and var revisited
    • reviewing / Nullability in review
  • nullable operator / Null objects
  • null objects
    • about / Null objects
    • safe call operator / Safe call operator
    • non-null assertion / Non null assertion
  • null reference / Null objects

O

  • object / Kotlin is object-oriented
  • object-oriented language / Kotlin is object-oriented
  • object-oriented programming (OOP)
    • about / Introducing OOP, What is OOP exactly?, Why do it like this?
    • encapsulation / Encapsulation
    • polymorphism / Polymorphism
    • inheritance / Inheritance
    • class recap / Class recap
    / OOP and inheritance
  • objects
    • declaring, from layout / Declaring and initializing the objects from the layout
    • initializing, from layout / Declaring and initializing the objects from the layout
  • OOP / Kotlin is object-oriented
  • operating system (OS) / Looking ahead at the Live Drawing app
  • operators
    • about / Operators and expressions
  • output
    • examining / Examining the output, Examining the output
  • overridden functions / Some other overridden functions
  • override / Class variables are properties

P

  • package / Packages, The structure of Kotlin code – revisited
  • package declaration / The package declaration
  • packages / The structure of Android's code
  • padding / Using padding and margin
  • Paint / Paint
  • palette
    • exploring / Exploring the palette – part 1, Exploring the palette – part 2, and more lambdas
    • EditText widget / The EditText widget
    • ImageView widget / The ImageView widget
    • RadioButton widget / RadioButtons and RadioGroups
    • RadioGroups widget / RadioButtons and RadioGroups
    • Switch widget / The Switch widget
    • CheckBox widget / The CheckBox widget
    • TextClock widget / The TextClock widget
  • parameter / Function parameter lists
  • parameter list / Function parameter lists
  • parent class / Using inheritance with open classes
  • particle system effect
    • implementing / Implementing a particle system effect
    • Particle class, coding / Coding the Particle class
    • ParticleSystem class, coding / Coding the ParticleSystem class
    • particle systems, spawning in LiveDrawingView class / Spawning particle systems in the LiveDrawingView class
  • polymorphism / What is OOP exactly?, Polymorphism
    • about / More polymorphism
    • abstract function / Abstract classes and functions
    • abstract classes / Abstract classes and functions
  • printDebuggingText function
    • adding / Adding the printDebuggingText function
  • private / Private
  • publishing / Publishing
    • reference link / Publishing

Q

  • qualifiers / The res/mipmap folder
  • querying / What is a database?

R

  • RadioButton widget / RadioButtons and RadioGroups
    • coding / Coding the RadioButton widgets
    • lambda, used for handling clicks / Using a lambda for handling clicks on a regular Button widget
    • Switch widget, coding / Coding the Switch widget
  • RadioGroups widget / RadioButtons and RadioGroups
  • random diversion / A random diversion
  • ranges / Ranges
  • reading
    • carrying / Carrying on reading
  • real world apps / Real-world apps
  • RecyclerAdapter / RecyclerView and RecyclerAdapter
    • widgets displaying, problem / The problem with displaying lots of widgets
    • widgets displaying, problem solution / The solution to the problem with displaying lots of widgets
    • usage / How to use RecyclerView and RecyclerAdapter
    • adding, to Note to Self project / Adding RecyclerView, RecyclerAdapter, and ArrayList to the Note to Self project
    • class, coding / Coding the RecyclerAdapter class
    • onCreateViewHolder function, coding / Coding the onCreateViewHolder function
    • onBindViewHolder function, coding / Coding the onBindViewHolder function
    • getItemCount function, coding / Coding getItemCount
    • ListItemHolder inner class, coding / Coding the ListItemHolder inner class
    • MainActivity, coding / Coding MainActivity to use the RecyclerView and RecyclerAdapter classes
  • RecyclerView / RecyclerView and RecyclerAdapter
    • usage / How to use RecyclerView and RecyclerAdapter
    • setting up, with RecyclerAdapter / What we will do to set up RecyclerView with RecyclerAdapter and an ArrayList of notes
    • setting up, with ArrayList of notes / What we will do to set up RecyclerView with RecyclerAdapter and an ArrayList of notes
    • adding, to Note to Self project / Adding RecyclerView, RecyclerAdapter, and ArrayList to the Note to Self project
    • Show Note button, removing / Removing the temporary "Show Note" button and adding RecyclerView
    • adding / Removing the temporary "Show Note" button and adding RecyclerView
    • list item, creating / Creating a list item for RecyclerView
    • MainActivity, coding / Coding MainActivity to use the RecyclerView and RecyclerAdapter classes
    • onCreate function, adding / Adding code to onCreate
    • createNewNote function, modifying / Modifying the createNewNote function
    • showNote function, modifying / Coding the showNote function
    • app, executing / Running the app
  • reference / Introduction to references
  • res/drawable folder / The res/drawable folder
  • res/layout folder / The res/layout folder
  • res/mipmap folder / The res/mipmap folder
  • res/values folder / The res/values folder
    • colors.xml file / The colors.xml file
    • strings.xml file / The strings.xml file
    • styles.xml file / The styles.xml file
  • res folder / The res folder
  • resource / Making the Note to self app Spanish, English, and German
  • return type / The return type and the return keyword
  • Runnable interface
    • reference link / Problems with threads

S

  • safe call operator / Safe call operator
  • scalable pixels (sp) / Sizing fonts using sp
  • screen orientation
    • unlocking / Unlocking the screen orientation
  • ScrollView
    • used, for building user interface (UI) / Building a UI with CardView and ScrollView
  • SeekBar / Animations demo app – introducing SeekBar
  • serialization / More advanced persistence
  • setters / Class variables are properties
  • SharedPreferences
    • used, for persisting data / Persisting data with SharedPreferences
    • used, for reloading data / Reloading data with SharedPreferences
  • Software Development Kit (SDK) / How Kotlin and Android work together
  • sound demo app
    • initiating, with Spinner widget / Sound demo app introducing the Spinner widget
    • sound effects, creating / Making sound effects
    • UI, laying out / Laying out the sound demo UI
    • coding / Coding the Sound demo
  • SoundPool class
    • about / The SoundPool class
    • initializing / Initializing SoundPool
    • sound files, loading into memory / Loading sound files into memory
    • sound, playing / Playing a sound
    • sound, stopping / Stopping a sound
  • SQLite / What is SQLite?
    • code, example / SQLite example code
    • table, creating / Creating a table
    • data, inserting, into database / Inserting data into the database
    • data, retrieving from database / Retrieving data from the database
    • database structure, updating / Updating the database structure
  • SQLite keywords
    • reference link / SQLite example code
  • SQLite types
    • reference link / SQLite example code
  • SQL keywords
    • insert / SQLite example code
    • delete / SQLite example code
    • select / SQLite example code
    • where / SQLite example code
    • from / SQLite example code
  • SQL syntax primer / The SQL syntax primer
  • SQL types
    • integer / SQLite example code
    • text / SQLite example code
    • real / SQLite example code
  • Stack / Seven useful facts about the Stack and the Heap
  • StackOverflow
    • about / StackOverflow
    • URL / StackOverflow
  • String / The manifests folder
  • string identifier / Adding the String resources
  • string resources
    • preparing / Preparing the String resources
  • String resources
    • using / Using String resources
  • strings.xml file / The strings.xml file
  • String templates / The express yourself demo app
  • Structured Query Language (SQL) / What is SQL?
  • stumbling block / The beginner's first stumbling block
  • styles.xml file / The styles.xml file
  • sub-packages / Packages
  • subtraction operator / The subtraction operator
  • super class / Using inheritance with open classes
  • SurfaceView class / Understanding the draw function and the SurfaceView class
  • swipe menu / The Angry Birds classic swipe menu
  • Switch widget / The Switch widget

T

  • table / What is a database?
  • TableLayout
    • data, laying out with / Laying out data with TableLayout
    • TableRow, adding to / Adding a TableRow to TableLayout
    • Component Tree, using / Using the Component Tree when the visual designer won't do
    • table columns, organizing / Organizing the table columns
    • main menu, linking back / Linking back to the main menu
  • tablet emulator
    • creating / Creating a tablet emulator
  • TextClock widget / The TextClock widget
  • TextView widgets
    • used, from layout / Using buttons and TextView widgets from our layout with a little help from interfaces
  • themes / Themes and material design
  • this keyword / We need to talk about this
  • thread
    • used, for implementing game loop / Implementing the game loop with a thread
    • coding / Coding the thread
    • initiating / Starting and stopping the thread
    • stopping / Starting and stopping the thread
    • initiating, Activity lifecycle used / Using the Activity lifecycle to start and stop the thread
    • stopping, Activity lifecycle used / Using the Activity lifecycle to start and stop the thread
  • thread class
    • reference link / Problems with threads
  • threads / Coding the LiveDrawingView class, The game loop
    • about / Threads
    • problems / Problems with threads
  • touches
    • handling / Handling touches
    • onTouchEvent function, coding / Coding the onTouchEvent function
    • HUD, finishing / Finishing the HUD
  • transparency
    • changing / Changing transparency
  • type inference / Saving keystrokes with type inference

U

  • UI
    • wiring up, with Kotlin code / Wiring up the UI with the Kotlin code (part 1), Wiring up the UI with the Kotlin code (part 2)
  • UI, with ConstraintLayout
    • building / Building a precise UI with ConstraintLayout
    • CalenderView, adding / Adding a CalenderView
    • view, resizing / Resizing a view in a ConstraintLayout
    • Component Tree window, using / Using the Component Tree window
    • constraints, adding manually / Adding constraints manually
    • elements, adding / Adding and constraining more UI elements
    • elements, constraining / Adding and constraining more UI elements
    • text clickable, making / Making the text clickable
  • UI layout elements / UI layout elements
  • UI text elements / UI text elements
  • UI widgets
    • creating, from pure Kotlin without XML / Creating UI widgets from pure Kotlin without XML
  • user data
    • backing up, in Note to self / Backing up user data in Note to self
  • user interface (UI) / A quick guided tour of Android Studio
    • building, with CardView / Building a UI with CardView and ScrollView
    • building, with ScrollView / Building a UI with CardView and ScrollView
    • setContentView, setting with Kotlin code / Setting the view with Kotlin code
    • image resources, adding / Adding image resources
    • content, creating for cards / Creating the content for the cards
    • dimensions, defining for CardView / Defining dimensions for CardView
    • CardView, adding to layout / Adding CardView to our layout
    • layout files, in another layout / Including layout files inside another layout
  • User Interface (UI) / Android resources

V

  • val revisited / Nullability – val and var revisited
  • variable constant / Declaring and initializing variables
  • variables
    • about / Variables
    • types / Types of variables
    • declaring / Declaring and initializing variables
    • initializing / Declaring and initializing variables
  • variables types
    • Int / Types of variables
    • Long / Types of variables
    • Float / Types of variables
    • Double / Types of variables
    • Boolean / Types of variables
    • Char / Types of variables
    • String / Types of variables
    • Class / Types of variables
    • Array / Types of variables
  • var revisited / Nullability – val and var revisited
  • view / Adding layouts within layouts, View
  • view group / Adding layouts within layouts
  • visibility modifiers
    • about / Visibility modifiers
    • public / Public
    • private / Private
    • protected / Protected
    • internal modifier / Internal
    • summary / Visibility modifiers summary

W

  • When Demo app / The When Demo app
  • while loops / while loops
  • widget exploration app / The widget exploration app
    • coding / Coding the widget exploration app
    • executing / Running the Widget Exploration app
  • widget exploration project
    • setting up / Setting up the widget exploration project and UI
  • widget exploration UI
    • setting up / Setting up the widget exploration project and UI

X

  • XML code
    • exploring / Exploring the project's Kotlin code and the main layout's XML code
lock icon The rest of the chapter is locked
arrow left Previous Section
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}