Tricky Android


Android tips, tricks and everything I found interesting


  1. Gradle tip #2: understanding syntax

    Part 1 Part 3 In the Part 1 we talked about tasks and different stages of the build lifecycle. But after I published it I realized that before we jump into Gradle specifics it is very important to understand what we are dealing with - understand its syntax and stop…

    on android, gradle

  2. Gradle tip #1: tasks

    Part 2 Part 3 With this post I would like to start series of Gradle-related topics I wish I knew when I first started writing Gradle build scripts. Today we will talk about Gradle tasks and specifically configuration and execution parts of the task. Since these terms might appear unknown…

    on android, gradle

  3. Saving Android View state correctly

    Today we will talk about saving and restoring View states in Android. I intentionally want to keep our focus on Android Views state just because I found this process just a little bit trickier than saving your Activity or Fragment state. Plus I think I've seen enough of re-invented wheels…

    on android, view, state

  4. Simple Ripple + Reveal + Elevation tutorial

    Today (during my 11 hours flight to Seattle :) ) I will try to guide you through the process of implementing Ripple, Elevation and Reveal effects for your views introduced in Android API 21. Here is what we will be doing today: Let's get party started I decided to choose circular buttons…

    on android, l-preview

  5. Fragments translate animation

    During one of my recent assignments I had to implement a Fragment which slides up from the bottom when you open it and slides back down when you close it. Something like this: Here list view is a separate ListFragment and when I press "list" action item - I add…

    on android, fragment, animation

  6. Protip. Inflating layout for your custom view

    Today's protip will be about one of the problems people usually face when they create custom compound views. Let's take a custom compound view as an example and try to figure out what does it take to create one. As you can see, I have a quite decent view here…

    on android, protip, layout