Some Tips for Android Developers

Yair Carreno
Jan 18, 2025

--

In this article, I have compiled some tips to remember when working with XML views.

Tip #1

If you ever need to remove white screens between screen transitions, remember that you can do so via styles using “android:windowDisablePreview”

Tip #2

Be careful when working with Imageview. Although using “background” seems similar to using “src,” they have different uses. For instance, using “setImageResource” will not work as you want if you use “background”

Tip #3

Remember to use “clipToPadding” on RecyclerViews to hide unnecessary spaces.

Tip #4

Keep in mind that the permission grant can be changed between the “onStart” and “onResume” lifecycle callbacks, as the user can change the access in the settings without closing your app.

--

--

Yair Carreno
Yair Carreno

Written by Yair Carreno

Software engineer with a technical blog about #iOS, #Android, #Angular. Author of “The Clean Way to Use Rx”: https://leanpub.com/the-clean-way-to-use-rx

No responses yet