450 Followers
·
Follow

Shared Element Transition : Having a view that moves from one activity to another in a smooth motion.

Let’s say you have more than one view to do a shared element transition in your app , how do you do it in Kotlin ?

Below are code snippets for Java and Kotlin

Example :

Image for post
Image for post
Shared element transition for image from Grid item to Details page

Java way :

Image for post
Image for post

Kotlin way:

Image for post
Image for post

or

Image for post
Image for post


Image for post
Image for post

Are you one of those who want to try Kotlin but are not sure whether jump in and try?

This post should help you make your decision — to go all in or if you want to experiment with it first.

  • Kotlin is a concise language that can drastically reduce boilerplate code when done correctly.
  • It focuses on type and null safety while maintaining readability.
  • Kotlin focuses on being lightweight and totally interoperable with Java making it perfect for Android application development
  • Kotlin 1.1 support from Java 1.6 — Most of the legacy Android or Backend Project are supported.

So what do the developers say :

  • “It’s really incredible how much we can pare down without sacrificing readability” — Christina Lee, Pintrest (https://youtu.be/xRDqDe4rxkM) …


Image for post
Image for post

This article is about how one can improve and learn to build better android apps. I’d like to share with you some of the learnings / resources that helped me along the way.

Improve your performance with Android Studio using shortcuts

Here is a collection of the best tips for Android studio https://plus.google.com/u/0/collection/wtO0PB

Use Live templates to save time : Write methods or loops from an abbreviation.

Eg.: fbc + Enter -> findViewById with cast

A amazing list of live templates to try out:

You can use your own custom templates. Here is a great article by Reto Meier. You can find more details at IntelliJ IDEA documentation.

Tools to use alongside Android studio while debugging your apps

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store