How To Allign Views Properly According To A Design?
a designer made some design for my Android app, here is a design for a ListView (not the real one but the same idea..): So in the middle of the green area there is some text, and
Solution 1:
Omar, your questions wasn't crystal clear, but I will give it a shot.
You use
In your row.xml, you would use
- LinearLayout as the parent with orientation as horizontal
It will have five child elements
- a. Yellow View with layout_weight=2
- b. Blue TextField with layout_weight=5
- c. Orange ImageField with layout_weight=3
- d. Green TextField with layout_weight=4
- e. Yellow View with layout_weight=1
For centering the text use appropriate text align property. All of these elements should have layout_width defined as fill_parent.
Post a Comment for "How To Allign Views Properly According To A Design?"