Synchronizing state between different components in Litho

This is the fifth post in the series - Exploring Litho. In the first post - Android GIF search engine with Litho, we explored some key aspects of Litho - LayoutSpec, MountSpec, Use Glide to load images, Update RecyclerView data, etc. In the second post - Managing State in Litho, we dabbled around with state in Litho components. In the third post - Navigation with Litho, we used LithoView and components to navigate instead of an Acitivity or a Fragment. If you’re not familiar with Litho, I would suggest you to go through the previous posts. We explored Events and how to use them to propogate changes in the fourth post - Using Events in Litho.

»
Author's profile picture Jay Rambhia on Android

Using Events in Litho

This is the fourth post in the series - Exploring Litho. In the first post - Android GIF search engine with Litho, we explored some key aspects of Litho - LayoutSpec, MountSpec, Use Glide to load images, Update RecyclerView data, etc. In the second post - Managing State in Litho, we dabbled around with state in Litho components. In the third post - Navigation with Litho, we used LithoView and components to navigate instead of an Acitivity or a Fragment. If you’re not familiar with Litho, I would suggest you to go through the previous posts.

»
Author's profile picture Jay Rambhia on Android

Navigation with Litho

This is the third post in series of exploring Litho. In the first post - Android GIF search engine with Litho, we explored some key aspects of Litho - LayoutSpec, MountSpec, Use Glide to load images, Update RecyclerView data, etc. In the second post - Managing State in Litho, we dabbled around with state in Litho components. If you’re not familiar with Litho, I would suggest you to go through the previous posts.

»
Author's profile picture Jay Rambhia on Android

Managing State in Litho

This is the second post in series of exploring Litho. In the first post - Android GIF search engine with Litho, we explored some key aspects of Litho - LayoutSpec, MountSpec, Use Glide to load images, Update RecyclerView data, etc. If you’re not familiar with Litho, I would suggest you to go through the first post.

»
Author's profile picture Jay Rambhia on Android

Build Android GIF search engine using Litho by Facebook

I recently tried my hands with React - A Javascript library for building user interfaces. I started following this amazing tutorial - React 101 by Tighten. I had just finished building my first GIF search engine and Facebook open sourced Litho - A declarative UI framework for Android. Well, Litho takes a lot of inspiration from React. I had just started to get my hands dirty with React (and liked it), I thought I give Litho a try. So what should I do? GIF search engine for Android using Litho!

»
Author's profile picture Jay Rambhia on Android

ViewPager Animations

Meaningful transitions and animations makes the UI more elegant. Now, I’m no UI expert but I can say when I like a thing better than the other. Well, this post is about that. Adding animations is good but adding intuitive animations is better. In the previous post, I talked about view position in ViewPager - ViewPager cards inspired by “ViewPager class inspired by Duolingo”.

»
Author's profile picture Jay Rambhia on Android

ViewPager cards inspired by "ViewPager cards inspired by Duolingo"

»
Author's profile picture Jay Rambhia on Android

Background Blur in Android

»
Author's profile picture Jay Rambhia on Android

RxJava for Form Validations

Since I started learning about RxJava, I have always been fascinated about how it can be used to make my life easier, code more fun and readable. I have successfully implemented Volley with RxJava to implement REST API calls, most of the async loading (images, files, etc). My worst enemy is forms. Forms need real time validations and real time responses to make UX better. In this post, I talk about my obsession about EditText. Here I am trying to solve it so that I can get some peace of mind.

»
Author's profile picture Jay Rambhia on Android

A Note About RxJava Debounce Operator

RxJava has myriad operators that we can use to make our code simpler and our lives easier. I’m very insistent when it comes to EditText validations that we should not start validation process as soon as the user starts entering the text. I like to give the user a bit of time to think about what they want to enter. My strategy has always been that - as soon as the user stops typing, wait for 800 milliseconds, and start the validation or request calls. One useful point to note about this is that if your app is making a network call (for search results, etc) and the user changes the query, it should cancel that call and fire another call based on some parameters. I used to do this using Handler.postDelayed() and Handler.removeCallback(). It was really tideous to do all this.

»
Author's profile picture Jay Rambhia on RxJava

A Note About RxJava and its Subscriber

Wow, I almost forgot about this part of my blog. I am writing a note after over a year. I could have written a post about it, but I was tinkering with RxJava and found something interesting and made sort of a theory which I am not sure is correct or not. I am not going to explain what Observers and Subscribers do in RxJava. Anyway, here it goes.

»
Author's profile picture Jay Rambhia on RxJava

NoCropper - Android Library for Cropping

Finally, after more than a year of working with Android, I’m releasing my first Open Source Library for Android. As the title says, the library is named NoCropper. It’s a lightweight library for cropping images. Since it doesn’t use any special features of Android, it is compatible with 11+ version of android (it uses ValueAnimator).

»
Author's profile picture Jay Rambhia on Android