Hi all. I currently start my app with a ListView, where each row in
the list contains two TextViews. The content for these are retrieved
from SQLite - a text description, followed by a content URI to an
image. Example:

Description1      content://media/external/images/media1
Description2      content://media/external/images/media2

Here's the relevant code:

String[] from = new String[] { MyDbAdapter.KEY_DESC,
MyDbAdapter.KEY_IMAGE };
int[] to = new int[] { R.id.desc, R.id.imageUri };
ListAdapter myList = new SimpleCursorAdapter(this, R.layout.my_row, c,
from, to);

---------------

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
>

   <TextView android:id="@+id/desc"
    xmlns:android="http://schemas.android.com/apk/res/android";
    ...more options
    />

  <TextView android:id="@+id/imageUri"
    xmlns:android="http://schemas.android.com/apk/res/android";
    ...more options
    />

</LinearLayout>

-------------

So far this is just a test. What I really want is the actual image
itself displayed as a thumbnail next to the description. I'm not quite
sure what to do next. I assume the second TextView has to become an
ImageView but after some playing around I haven't achieved what I'm
after.

Any help greatly appreciated.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to