Use Kotlin Anko DSL and Say No to Android Layouts Written in XML

We would like to introduce an application that serves as our lunch menu.

Every day at 13:37 we eat lunch together at our cool office, catered by the lovely couple Hanna and Tadeo. The only problem we have with lunch right now is ordering. The menus for the upcoming week are provided in a Google Sheet which we have to fill out before each Friday. It’s inconvenient and requires a lot of time on everyone’s part. We already have an iOS app that gives us access to the lunch menus, so we decided to write a similar one for our Android users.

ss1 (1)ss2

Our Minimal Viable Product (MVP) is dead simple. It contains five tabs with lunch menus for each given day, a list with the number of meals ordered by the logged in user, and the total number of orders for every given meal. We’re using the Google Sheet API as our backend.

We decided to choose Kotlin as our programming language. There is some good stuff out there about learning Kotlin, so we decided to share with you a less documented but still very interesting topic — creating Android layouts in code with the help of the Kotlin Anko library. Our post assumes that you have at least a basic working knowledge of developing Android applications and have at least skimmed through the Kotlin documentation. Reading through this this piece will give you a basic knowledge of creating Android Layouts directly in code using Kotlin Anko.

Continue Reading

Unit Testing RxJava: From Beginner to Competent User

RxJava and Reactive Programming is a very hot topic in the Java and Android worlds and we follow it very closely here at Macoscope. Unfortunately, there aren’t all that many materials available about testing reactive code. I would like to share with you our findings on the subject and guide you through the most reasonable ways of unit testing RxJava-related code. This article is aimed primarily at developers who already have a basic working knowledge of developing applications with the help of RxJava and unit testing in general. Code examples are written in Groovy and use Spock framework as a test runner.

rxjava

Continue Reading