There you are, happily creating your layout files in the Eclipse plug-in’s layout editor. Dragging and dropping is a breeze. But then one day, you open a layout XML file and boom! No UI! All you see is the XML tree with all the nodes and attributes. What happened?
My OC side was alarmed when suddenly, my Problems view in Eclipse was filled with warnings on my XML files. Each of my XML files had a warning with it, and that little yellow exclamation mark on the side:
I have a TextView (who doesn’t?) and I want to adjust its height automatically, depending on the length of the text it will contain. Should be easy. It was, but it took me a couple of minutes to figure it out.
If you have SDK version 7, you are most probably missing the
hierarchyviewer from your
/tools folder. To check your SDK version, launch the SDK manager UI from your installation path, usually
C:\android-sdk-windows, then click About.
In my previous post, I showed you how to set string plurals. If you noticed, the methods to get the plurals strings only accept
ints. What if (like me) you want to display a decimal value? I am getting my raw value from a progress bar with a range of 1-10, with 0.1 increments.
Last week, I discovered Android’s support for plural strings by accident. And a good accident it was since I am working on an app that will display a float to the user. I used to display:
When trying to import an existing Android project to Eclipse, I always encounter the error:
The method *XXXXX* must override a superclass method.
<img src=http://www.despicable.me/pops/minionMaker/userpics/910156207.jpg width=”380” height=”473” alt=”I’ve created a Minion to join Gru’s Minion army.” />
Sooner or later, you would want to display a message to your user with dynamic content. This may be the number of results, the user’s name, etc.
I was thinking of starting a quick-tips style blog for software development (mostly for myself, since I tend to forget stuff a lot recently).