This is a general question,
It has always been a nightmare to me trying to solve out view-related problems in android. Actually not the logic, but this takes lots of my time, and I follow a wrong approach that I know that is wrong: I try something else and if I see the right thing in the screen that is ok. But I know this is not the right approach. Actually I want to clear out my mind by learning the internal operations while creating views in XML.
What I need is a reference or a tutorial that clearly explains what happens when I create a view, a layout, a view tree etc. I actually want to know what the parser operates during this creation.
In IOS platform they have developed a very simple and intuitive storyboard designer that is very good with look and feel and developer doesn’t have to spend much time solving ui issues. I just want to draw something as easy as in this way. At least there should be something that can drive me to think that it is easy to draw ui. Suggestions? Thanks
First, you will never find something quite like Apple’s Interface Builder for Android. The reason is, Apple does a lot of hidden “magic” behind the scenes that you will never see, and can never do anything about. It is both a blessing and a curse that they do so much work for you. Google/Android does not do this.
An Android XML layout is essentially 1:1 equivalent to building your layout using java code. The properties you define for a view in the xml are handed directly to that view’s java code definition, and are read/interpreted there (see AttributeSet).
The best thing to do is to read Google’s documentation about layouts and views. Android layouts are dynamic in their nature, where Apple’s are static by nature. It is often best to forget everything you know about Apple’s views and learn to do it the way Google prescribes. You can learn more about Android Layouts here.