0

enter image description here

I am looking for a suggestion how to create a layout which looks like the image above. I can't figure out how the area in white is done.

Any pointers will be appreciated.

user2260040
  • 1,275
  • 1
  • 13
  • 26
  • Can you please be more specific? – hmartinezd Mar 24 '14 at 03:08
  • Sorry, if I am not clear. I can't get my head around creating the layout as per the image. Is it a layout within a layout, or is there some other way to achieve this. – user2260040 Mar 24 '14 at 03:09
  • 1
    For what I can see, you are using a ListView, or trying to, so you only have to define a list_item_layout. I recommend to use RelativeLayout, as it gives you more power. In order to have the round corners, you can use a nine-patch image that includes the round corners. – hmartinezd Mar 24 '14 at 03:14
  • Thanks. So this will have basically two components in the listview. One for showing the mins section on the left and another one for the rest of it. Is that a correct assumption? – user2260040 Mar 24 '14 at 03:27
  • Yes, you can have a relative layout, with two relative layout children, one in the left with the mins, and one in the left with the other info. Of course, each relative layout, can also contains as many layout you as you need. Define the top layout with width="match_parent" and heigth="wrap_content". – hmartinezd Mar 24 '14 at 03:31

2 Answers2

3
  • Grav- Gravity/Layout Gravity
  • Rel Lay - Relative Layout
  • Txt.V - TextView
  • Img.V - Image View
  • L.L - LinearLayout
  • Ornt - Orientation
  • Hoz - Horizontal
  • Ver - Vertical

Set left Layout's L.Height to match_parent, Right Layout's L.Height to wrap_content set min-height to right.layout.

If RelativeLayout is used in Left layout, use align_parentTop center_horizontal align_parentBottom respectively.

You might not get the same while working in eclipse, but will get the required in Device/Emulator. Note, your effort is needed.

Custom ListView

VenomVendor
  • 15,064
  • 13
  • 65
  • 96
0

Here is a good tutorial on customizing a ListView (Scroll down to Section 1.4): http://www.vogella.com/tutorials/AndroidListView/article.html

If you're looking to make rounded corners you can look at this post: How do I create a ListView with rounded corners in Android?

Community
  • 1
  • 1
  • The tutorial explains list views in general, and I think it will give you a better understanding of how to customize list views. –  Mar 24 '14 at 03:19