to be used for a range of items in a ListView me to make a relative layout in XML for a list item The problem is happening. I have tried for hours and trying to tear my hair out, how I want it, but everything is not reaching the right place and does not overlap or mis-align. I can get the first image in place and the next two textviews, but the last textView and imageView can not be found.
I have attached the image of a wireframe style of how I am trying to look for it and was wondering if anyone could help me?
- Image view is a set icon full width of the row with padding around it?
- Take the majority of the two text view widths to find the textView text being long enough to get it shortened if it runs out of the space is to shrink the ideal font size?
- The next TextView will only hold a small string of needs, or may be max 5 characters.
- The final image view indicates that this list item is clickable for more information. It should be centered as it is shown.
- I would like that if the icon, the last text view and the last image always be in one place / alignment in the list.
If someone can give some help on this, I would be very grateful.
Cheers People
To keep anyone interested, I am successful in I know how painful it is to find an answer to a problem and it was not completely solved.
& lt ;? Xml version = "1.0" encoding = "UTF-8" & gt; & Lt; RelativeLayout xmlns: android = "http://schemas.android.com/apk/res/android" android: id = "@ + id / RelativeLayout" Android: layout_width = "fill_parent" Android: layout_height = "Android: Attr / listPreferredItemHeight "Android: padding =" 6dip "& gt; & Lt; imageView android: id = "@ + id / Icon" Android: layout_margin = "5dip" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: layout_centerVertical = "true" / & gt; Android: layout_width = "fill_parent" Android: lines = "1" Android: layout_toRightOf = "@ + id / Icon" Android: layout_toLeftOf = & gt; & Lt; TextView Android: Android: "@ + id / distance" Android: text color = "@color / black text" Android: text size = "20dip" Android: text = "name" /> Android: Android: Android: Android: Android line = "1" Android: Leaut_troitof = "@ + id / icon" Android: Leaut_belo = Android: Android: Android: Android: "@ + id / earnings" Android: layout_toLeftOf = "@ + id / distance" Android: textcolor = "@color / blacktext" Android: textSize = "15dip" Android: Text = "Address" /> & Lt; Android: layout_centerVertical = "true" Android: layout_width = "wrap_content" android: lines = "1" android: id = "@ + id / distance" Android: layout_height = "wrap_content" android: layout_toLeftOf = "@ + id / arrow" "Android: Text collar =" @color / black text "Android: text size =" 12dip "Android: text =" 100m "/> & Lt; ImageView Android: Android: Layout_Hight = "wrap-content" Android: layout_width = "wrap_content" Android: layout_margin = "5dp" Android: layout_language right = "true" Android: layout_centervertical = "true" Android: src = "@ drawable / Redarrow "/> & Lt; / RelativeLayout & gt;
Comments
Post a Comment