Kotlin programming by example : build real-world Android and web applications the Kotlin way /
Kotlin greatly reduces source code verbosity; with the recently announced first class support from the Android team, a great opportunity has been created. The book will help you learn how to create apps with Kotlin from scratch and get them up-and-running.
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Birmingham :
Packt Publishing,
2018.
|
Temas: | |
Acceso en línea: | Texto completo |
Tabla de Contenidos:
- Cover; Copyright and Credits; Dedication; Packt Upsell; Contributors; Table of Contents; Preface; Chapter 1: The Fundamentals; Getting started with Kotlin; JDK installation; Installation on Windows; Installation on macOS; Installation on Linux; Compiling Kotlin programs; Working with the command-line compiler; Installing the command-line compiler on macOS; Homebrew; MacPorts; Installing the command-line compiler on Linux; SDKMAN!; Installing the command-line compiler on Windows; Running your first Kotlin program; Writing scripts with Kotlin; Using the REPL; Working with an IDE.
- Installing IntelliJ IDEASetting up a Kotlin project with IntelliJ; The fundamentals of the Kotlin programming language; Kotlin basics; Variables; Variable scope; Local variables; Operands and operators; Types; Int; Float; Double; Boolean; String; Char ; Array; Functions; Declaring functions; Invoking functions; Return values; The function naming convention; Comments; Single-line comments; Multiline comments; Doc comments; Controlling program flow; Conditional expressions; The if expression; The when expression; The Elvis operator; Loops; The for loops; The while loops.
- The break and continue keywordsThe do ... while loops; Packages; The import keyword; Object-oriented programming concepts; Introduction; Working with classes; Creating objects; Companion objects; Properties; Advantages of Kotlin; Developing Android applications with Kotlin; Setting up Android Studio; Building your first Android application; Creating a user interface; Running the application; Fundamentals of the web; What is the web?; Hypertext Transfer Protocol; Clients and servers; HTTP requests and responses; HTTP methods; Summary; Chapter 2: Building an Android Application
- Tetris.
- Android
- an overviewApplication components; Activities; Intents; Intent filters; Fragments; Services; Loaders; Content providers; Understanding Tetris; Creating the user interface; Implementing the layouts; ConstraintLayout; Margins; Chains; Dimension constraints; Defining dimension resources; Views; View groups; Defining string resources; Handling input events; Event listeners; Working with SharedPreferences; Implementing the game activity layout; The app manifest; Structure of the app manifest file; ; ; ; ; ; ; Summary.
- Chapter 3: Implementing Tetris Logic and FunctionalityImplementing the Tetris gameplay; Modeling a tetromino; Characteristics of a block; Behaviors of a block; Modeling block shape; Private access modifier (private); Public access modifier (public); Protected access modifier (protected); Internal visibility modifier (internal); Creating the application model; Creating TetrisView; Implementing ViewHandler; Implementing Dimension; Implementing TetrisView; Finishing up GameActivity; Introduction to Model-View-Presenter (MVP); What is MVP?; Model; View ; Presenter; Varying implementations of MVP.