gdieckhaus
Lurker
I know there has to be an easy way to do this, but I cant seem to figure it out.
I'm trying to load a table layout with 2 columns.
The column is a picture, and the 2nd column is text.
I have been able to do this statically by doing something like this...
</TableRow>
However, I am looking for a way to dynamically create this so I dont have to code the xml for every picture.
Yet I cant seem to find a way to do this or dynamically change the image to a picture that is in the resource drawable directory.
Any help or pointers would be appreciated.
I'm trying to load a table layout with 2 columns.
The column is a picture, and the 2nd column is text.
I have been able to do this statically by doing something like this...
<
TableRow>
<ImageView
android:id="@+id/image2"
android:adjustViewBounds="true"
android:maxWidth="100sp"
android:maxHeight="100sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/a_2"
/>
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="left"
android:text="@string/Picture2Name"
android:singleLine="false"
android:singleLine="false"
/>
</TableRow>
However, I am looking for a way to dynamically create this so I dont have to code the xml for every picture.
Yet I cant seem to find a way to do this or dynamically change the image to a picture that is in the resource drawable directory.
Any help or pointers would be appreciated.