Building a Reactive Functional Todo Application with Kotlin in Android (Part 2)

in #utopian-io7 years ago (edited)

What Will I Learn?

  • You will learn how to use Constraint Layouts and List Views in Android
  • You will learn how to work with Observables and Subscribers with Kotlin in Android
  • You will learn how to use filters and higher order functions in an Android activity

Requirements

  • Android Studio 3.0 or Android Studio Canary
  • A basic understanding of the Android ecosystem
  • A fair understanding of Kotlin or the Java programming language

Difficulty

  • Intermediate

Description

In this tutorial, we finish off our Reactive Functional Android Todo Application by building out the User Interface (UI) and the main activity. We first start by looking at the various options that we have for building out our User Interface. We use Android Constraint Layouts to position the elements inside of our layouts. We also talk about how we can manually set the dimensions and properties of each element by way of the Graphical User Interface Editor in Android Studio. We use a List View to bind our Todo items in a fairly quick and streamlined way. Also, this project makes use of the Button, Edit View, Floating Action Button, Check Box and Text View fields. We use the FAB specifically to implement a small menu in this application.

We then set about implementing the main activity of our project. We interface this activity with our store and data layer by having it subscribe to the Observable stream. The Renderer Interface that was built in the last tutorial is also used to bind the data onto the List View through a Custom List View Adapter that also extends the Array Adapter class. We create a Higher Order Function to manipulate and filter the Observable Data. In this way, we are able to make it so that our FAB has the ability to filter our data into subsets based on the status of the data. Finally, we add various on click listeners and on long press listeners to allow the user of the application to add, remove and update the Todo Items in our application.

The source code for this project can be found here

Video Tutorial

Curriculum

Related Content

  • Android Applications in Kotlin
  • Desktop Applications in Kotlin
  • Intro to Kotlin Series



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Hey @tensor I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Thank you guys. Always a pleasure to work with your platform.

Regards @tensor.

I have to notice that publishing such diverse and complex materials every day is an amazing achievement. Also, your choice of programming languages, tools, methodologies and problems is really good.
The way of presenting is often to fast for my taste, but I suppose it is because of my age (48) :). Anyway, It can be repeated any time.

Thank you for your great work.

Thank you @hernad.

I really do appreciate what you've said here. I am sorry that I go a little to fast for you; I often watch YouTube videos at 2-3x speed because I find them too slow myself. I should probably slow things down for more complex subjects but its hard to find the time to do so unfortunately.

None the less, I hope you find something in the future from my channel that you might be able to use.

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

That was really fast. Thank you for reviewing my content.

@tensor, Like your contribution, upvote.

Thank you for the support. I am glad you enjoyed the contribution.

Information that is needed by everyone, thank you for sharing

you always have great content