Grokking Android

Getting Down to the Nitty Gritty of Android Development

Posts tagged “Layout”:

Displaying Error Hints in Forms on Android


Displaying error messages in forms on Android is really simple. Most widgets have a setError(CharSequence text) method that can be used to indicate problems. Say you have a form where you have to enter a product. Now while entering more data into the form the app might check the product number and some backend service […]  Continue Reading  “Displaying Error Hints in Forms on Android”

Finding all View-IDs of an Android UI


Recently I stumbled upon a NullPointerException caused by using findViewById( which returned null for this id. But the id was in the layout file. And I didn’t change the layout programmatically. Furthermore other widgets were found without any problem. Hmm – what’s going on? To analyze the problem I thought about a way to find […]  Continue Reading  “Finding all View-IDs of an Android UI”