I have already do the following xmls:
main.xml
Using xml Syntax Highlighting
- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent" android:layout_height="fill_parent"
- android:orientation="vertical">
- <TextView android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:text="Please" />
- <ListView android:id="@+id/list" android:layout_width="fill_parent"
- android:layout_height="wrap_content" />
- </LinearLayout>
Parsed in 0.002 seconds, using GeSHi 1.0.8.4
row.xml
Using xml Syntax Highlighting
- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent" android:layout_height="wrap_content"
- android:orientation="horizontal">
- <ImageView android:id="@+id/icon" android:layout_width="50px"
- android:layout_height="50px" android:layout_centerHorizontal="true" />
- <TextView android:id="@+id/text1" android:textSize="16px"
- android:textStyle="bold" android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:gravity="center_vertical" />
- </LinearLayout>
Parsed in 0.002 seconds, using GeSHi 1.0.8.4
Also, I have a data.xml
Using xml Syntax Highlighting
- <data>
- <entry>
- <name>Abc</name>
- <image>http://www.comput.com/abc.jpg</image>
- <id>123</id>
- </entry>
- <entry>
- <name>Def</name>
- <image>http://www.comput.com/def.jpg</image>
- <id>321</id>
- </entry>
- </data>
Parsed in 0.002 seconds, using GeSHi 1.0.8.4
I know that I need to XML parser and already know how to parse an xml in android.
1) The problem is how to assign a web image to the list view.
2) The the item in list is click, how can I get the id. For example, when I click "Abc", I need the program return "123" for me
3) I already add android:gravity="center_vertical", why the text still align with top?
Thanks


sorry)) just now clap eyes on "public class List14 extends ListActivity" )))) When I work with similar problem, my class extends LinearLayout, not ListActivity and nothing to say about any problems. Maybe in the future... ) I don't know for this moment.
