Technology
4
 min read
November 20, 2020

#goodroidtips I. - Tips & tricks for Android developers

Peter Šuly
Android developer

A regular section in which I will share with you current and useful tips and tricks from the world of Android development. :)

Index
  1. Layout inspector tool in Android Studio
  2. VB vs. Synthetic vs. FindView
  3. In-App ratings
  4. New IME methods
  5. Embedded emulator
android developer

Do you use Layout inspector tool in Android Studio?

Layout inspector is a great tool for debugging basic layout properties in applications. Just a few clicks to find out why you can't see your view. In version 4.0, a 3D layout inspector was also added to Android Studio, thanks to which you can look at the layout from different angles and debug, for example, the elevation of elements.

android developer vzdelavanie

How do you approach views on your projects?

We at Goodrequest have been stuck to the use of Kotlin Synthetic for a long time. With the arrival of View Binding we found many benefits and decided to give it a chance. Therefore, we are currently starting new projects using View Binding. And what are the 3 most commonly used techniques in terms of simplicity, security and code size?

- View Binding - easy, compile time safety, without the need for a lot of code
- Kotlin Synthetic - easy, not compile time safety, without the need for a lot of code
- FindViewById - easy but unsustainable, not compile time safety, lot of boilerplate code

We use View Binding and Kotlin Synthetic.

App ratings also for Android!

After a long time, Google finally listened to the wishes of developers and created the Google Play In-App review API. This allows you to conveniently request a review of the application directly in it, without the user having to leave it. The review dialog can be requested at virtually any time, the API itself decides whether to display it or not. For Android developers, this makes work easier. Thanks to this feature, we do not have to write our own conditions when the request for review should be displayed.
Have you also been waiting for this opportunity as I have?

Synchronized keyboard animations!

The new API comes with the ability to synchronize content in the application with sliding and retracting the keyboard. In addition, it is now possible to control system UI (eg System bar), immersive mode and others using the WindowInsetsAnimationController. These options will help us to make our applications a little closer to the design guidelines and thus more intuitive for users. The methods do not yet have a Jetpack version. However, I believe that it will be
added soon!

Embedded emulator directly in Android Studio!

The latest August version of Android Studio brought many improvements. Among other things, it is also possible to run the emulator of the Android device directly in the Android Studio. This feature significantly saves screen space and speeds up navigation between the code editor and the emulator. Embedded emulator currently does not contain all the possibilities of the old emulator, in other versions of AS they will definitely be gradually added. Nevertheless, it is already a change that developers will appreciate. Will you use it or are you waiting for additional options and improvements?

For more #GoodroidTips follow me on LinkedIn, or Twitter profile. :)

I will be happy if you let me know if you like my tips, or if you share topics you would like to see on my profile or our blog.

Like what you see?
Join our newsletter.

Great! Welcome to newsletter.
Oops! Something went wrong while submitting your email.
High quality content once a month. No spam, we promise.
Your personal data is processed in accordance with our Memorandum on Personal Data Protection.

Páči sa vám náš content?
Odoberajte newsletter.

Great! Welcome to newsletter.
Oops! Something went wrong while submitting your email.
Vaše osobné údaje sú spracované v súlade s našim Memorandom na ochranu osobných údajov.