I have a listActivity and wanted to create a list with the second layout (attached). What has any idea how to build this layout in xml?!
A:
A horizontal LinearLayout with some gravity, and some styled text or from Html will do the middle step.
Pentium10
2010-06-25 19:33:27
Hi, Pentium10...I'm not worried about the styles and links, do not want it.What I want is a list where each line has two sentences (one below the other) and a final image. Similar to the application of twitter.
Pedro
2010-06-25 19:48:24
+2
A:
I propose RelativeLayout
One picture will has android:layout_alignParentLeft="true"
Another picture has android:layout_alignParentRight="true"
Text (and something else in the middle part) will be located in another layout (e.g LinearLayout
) but with attribute, smth like following:
android:layout_toRightOf="@id/imgLeft"
android:layout_toLeftOf="@id/imgRight"
davs
2010-06-25 20:09:59
A:
your best bet is to use holder.imageView.setText(Html.fromHtml(myStringWithHtmlInIt));
where you can put in standard <br />
, <b>
& <font>
and other html formatting tags to do this type of thing...
Ben
2010-06-25 21:30:21