--

That suppresses the runnable, you’re right. On the other hand you don’t solve the problem of not being able to use a non-resource image, and having to stash the error drawable resource ID somewhere for as long as the view lives. Given you would still have to manually rebind things when the restore is upon you (again, using a runnable or a view tree observer, because timings issues are the same the original had), you might make the workaround slightly less hacky. Still, no clean way of doing it…

Given setError() is a de facto deprecated way of showing errors, it’s way better to use other newer, safer ways of doing it, as suggested in the article. No reason to do hacks and being subjected to the various OEMs’ internal implementations, when there’s a better, cleaner way (that also looks better).

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Sebastiano Poggi — seb@androiddev.social
Sebastiano Poggi — seb@androiddev.social

Written by Sebastiano Poggi — seb@androiddev.social

"It depends" 🤷‍♂️ - UXE on Android Studio at Google. A geek 🤓 who has a serious thing for good design ✨ and for emojis 🤟 Personal opinions only 😁

Responses (1)

Write a response