Android Programming with Kotlin for Professionals: guide to kotlin programming notes for Professionals step by step
- Length: 92 pages
- Edition: 1
- Language: English
- Publication Date: 2021-07-30
- ISBN-10: B09BLFV8Q7
- Sales Rank: #0 (See Top 100 Books)
Android is the most popular mobile operating system in the world and Kotlin has been declared by Google as a first-class programming language to build Android apps. With the imminent arrival of the most anticipated Android update, Android 10 (Q), this book gets you started building apps compatible with the latest version of Android.
It adopts a project-style approach, where we focus on teaching the fundamentals of Android app development and the essentials of Kotlin by building three real-world apps and more than a dozen mini-apps. The book begins by giving you a strong grasp of how Kotlin and Android work together before gradually moving onto exploring the various Android APIs for building stunning apps for Android with ease. You will learn to make your apps more presentable using different layouts. You will dive deep into Kotlin programming concepts such as variables, functions, data structures, Object-Oriented code, and how to connect your Kotlin code to the UI. You will learn to add multilingual text so that your app is accessible to millions of more potential users. You will learn how animation, graphics, and sound effects work and are implemented in your Android app.
By the end of the book, you will have sound knowledge about significant Kotlin programming concepts and start building your own fully featured Android apps.
What you will learn
- Learn how Kotlin and Android work together
- Build a graphical drawing app using Object-Oriented Programming (OOP) principles
- Build beautiful, practical layouts using ScrollView, RecyclerView, NavigationView, ViewPager and CardView
- Write Kotlin code to manage an apps’ data using different strategies including JSON and the built-in Android SQLite database
- Add user interaction, data captures, sound, and animation to your apps
- Implement dialog boxes to capture input from the user
- Build a simple database app that sorts and stores the user’s data
About Chapter 1: Getting started with Kotlin Section 1 1: Hello World Section 1 2: Hello World using a Companion Object Section 1 3: Hello World using an Object Declaration Section 1 4: Main methods using varargs Section 1 5: Compile and Run Kotlin Code in Command Line Section 1 6: Reading input from Command Line Chapter 2: Basics of Kotlin Section 2 1: Basic examples Chapter 3: Strings Section 3 1: String Equality Section 3 2: String Literals Section 3 3: Elements of String Section 3 4: String Templates Chapter 4: Arrays Section 4 1: Generic Arrays Section 4 2: Arrays of Primitives Section 4 3: Create an array Section 4 4: Create an array using a closure Section 4 5: Create an uninitialized array Section 4 6: Extensions Section 4 7: Iterate Array Chapter 5: Collections Section 5 1: Using list Section 5 2: Using map Section 5 3: Using set Chapter 6: Enum Section 6 1: Initialization Section 6 2: Functions and Properties in enums Section 6 3: Simple enum Section 6 4: Mutability Chapter 7: Functions Section 7 1: Function References Section 7 2: Basic Functions Section 7 3: Inline Functions Section 7 4: Lambda Functions Section 7 5: Operator functions Section 7 6: Functions Taking Other Functions Section 7 7: Shorthand Functions Chapter 8: Vararg Parameters in Functions Section 8 1: Basics: Using the vararg keyword Section 8 2: Spread Operator: Passing arrays into vararg functions Chapter 9: Conditional Statements Section 9 1: When-statement argument matching Section 9 2: When-statement as expression Section 9 3: Standard if-statement Section 9 4: If-statement as an expression Section 9 5: When-statement instead of if-else-if chains Section 9 6: When-statement with enums Chapter 10: Loops in Kotlin Section 10 1: Looping over iterables Section 10 2: Repeat an action x times Section 10 3: Break and continue Section 10 4: Iterating over a Map in kotlin Section 10 5: Recursion Section 10 6: While Loops Section 10 7: Functional constructs for iteration Chapter 11: Ranges Section 11 1: Integral Type Ranges Section 11 2: downTo() function Section 11 3: step() function Section 11 4: until function Chapter 12: Regex Section 12 1: Idioms for Regex Matching in When Expression Section 12 2: Introduction to regular expressions in Kotlin Chapter 13: Basic Lambdas Section 13 1: Lambda as parameter to filter function Section 13 2: Lambda for benchmarking a function call Section 13 3: Lambda passed as a variable Chapter 14: Null Safety Section 14 1: Smart casts Section 14 2: Assertion Section 14 3: Eliminate nulls from an Iterable and array Section 14 4: Null Coalescing / Elvis Operator Section 14 5: Nullable and Non-Nullable types Section 14 6: Elvis Operator (?:) Section 14 7: Safe call operator Chapter 15: Class Delegation Section 15 1: Delegate a method to another class Chapter 16: Class Inheritance Section 16 1: Basics: the 'open' keyword Section 16 2: Inheriting fields from a class Section 16 3: Inheriting methods from a class Section 16 4: Overriding properties and methods Chapter 17: Visibility Modifiers Section 17 1: Code Sample Chapter 18: Generics Section 18 1: Declaration-site variance Section 18 2: Use-site variance Chapter 19: Interfaces Section 19 1: Interface with default implementations Section 19 2: Properties in Interfaces Section 19 3: super keyword Section 19 4: Basic Interface Section 19 5: Conflicts when Implementing Multiple Interfaces with Default Implementations Chapter 20: Singleton objects Section 20 1: Use as replacement of static methods/fields of java Section 20 2: Use as a singleton Chapter 21: coroutines Section 21 1: Simple coroutine which delay's 1 second but not blocks Chapter 22: Annotations Section 22 1: Meta-annotations Section 22 2: Declaring an annotation Chapter 23: Type aliases Section 23 1: Function type Section 23 2: Generic type Chapter 24: Type-Safe Builders Section 24 1: Type-safe tree structure builder Chapter 25: Delegated properties Section 25 1: Observable properties Section 25 2: Custom delegation Section 25 3: Lazy initialization Section 25 4: Map-backed properties Section 25 5: Delegate Can be used as a layer to reduce boilerplate Chapter 26: Reflection Section 26 1: Referencing a class Section 26 2: Inter-operating with Java reflection Section 26 3: Referencing a function Section 26 4: Getting values of all properties of a class Section 26 5: Setting values of all properties of a class Chapter 27: Extension Methods Section 27 1: Potential Pitfall: Extensions are Resolved Statically Section 27 2: Top-Level Extensions Section 27 3: Lazy extension property workaround Section 27 4: Sample extending Java 7+ Path class Section 27 5: Sample extending long to render a human readable string Section 27 6: Sample extending Java 8 Temporal classes to render an ISO formatted string Section 27 7: Using extension functions to improve readability Section 27 8: Extension functions to Companion Objects (appearance of Static functions) Section 27 9: Extensions for easier reference View from code Chapter 28: DSL Building Section 28 1: Infix approach to build DSL Section 28 2: Using operators with lambdas Section 28 3: Overriding invoke method to build DSL Section 28 4: Using extensions with lambdas Chapter 29: Idioms Section 29 1: Serializable and serialVersionUid in Kotlin Section 29 2: Delegate to a class without providing it in the public constructor Section 29 3: Use let or also to simplify working with nullable objects Section 29 4: Use apply to initialize objects or to achieve method chaining Section 29 5: Fluent methods in Kotlin Section 29 6: Filtering a list Section 29 7: Creating DTOs (POJOs/POCOs) Chapter 30: RecyclerView in Kotlin Section 30 1: Main class and Adapter Chapter 31: logging in kotlin Section 31 1: kotlin logging Chapter 32: Exceptions Section 32 1: Catching exception with try-catch-finally Chapter 33: JUnit Section 33 1: Rules Chapter 34: Kotlin Android Extensions Section 34 1: Using Views Section 34 2: Configuration Section 34 3: Painful listener for getting notice, when the view is completely drawn now is so simple and awesome with Kotlin's extension Section 34 4: Product flavors Chapter 35: Kotlin for Java Developers Section 35 1: Declaring Variables Section 35 2: Quick Facts Section 35 3: Equality & Identity Section 35 4: IF, TRY and others are expressions, not statements Chapter 36: Java 8 Stream Equivalents Section 36 1: Accumulate names in a List Section 36 2: Collect example #5 - find people of legal age, output formatted string Section 36 3: Collect example #6 - group people by age, print age and names together Section 36 4: Dierent Kinds of Streams #7 - lazily iterate Doubles, map to Int, map to String, print each Section 36 5: Counting items in a list after filter is applied Section 36 6: Convert elements to strings and concatenate them, separated by commas Section 36 7: Compute sum of salaries of employee Section 36 8: Group employees by department Section 36 9: Compute sum of salaries by department Section 36 10: Partition students into passing and failing Section 36 11: Names of male members Section 36 12: Group names of members in roster by gender Section 36 13: Filter a list to another list Section 36 14: Finding shortest string a list Section 36 15: Dierent Kinds of Streams #2 - lazily using first item if exists Section 36 16: Dierent Kinds of Streams #3 - iterate a range of Integers Section 36 17: Dierent Kinds of Streams #4 - iterate an array, map the values, calculate the average Section 36 18: Dierent Kinds of Streams #5 - lazily iterate a list of strings, map the values, convert to Int, find max Section 36 19: Dierent Kinds of Streams #6 - lazily iterate a stream of Ints, map the values, print results Section 36 20: How streams work - filter, upper case, then sort a list Section 36 21: Dierent Kinds of Streams #1 - eager using first item if it exists Section 36 22: Collect example #7a - Map names, join together with delimiter Section 36 23: Collect example #7b - Collect with SummarizingInt Chapter 37: Kotlin Caveats Section 37 1: Calling a toString() on a nullable type Appendix A: Configuring Kotlin build Section A 1: Gradle configuration Section A 2: Using Android Studio Section A 3: Migrating from Gradle using Groovy script to Kotlin script Credits You may also like
Donate to keep this site alive
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.