I guess it's safe to say that you're generating the thumbs during
runtime. First, I would subclass BaseAdapter for the Item creation and
to listener creation.
There are three ways to achieve what you want:

1. Populate ListView's Adapter with a LinearLayout. Within the
LinearLayout (orientation="horizontal"), put an ImageView and a
TextView.
2. Populate ListView's Adapter with a Custom View. Subclass a View
that encapsulates a LinearLayout parent like in #1.
3. Populate ListView's Adapter with a Custom Button. First encapsulate
your thumbs in some Drawable objects. Then you can add it to your
Custom Button object you're using. Word of caution: when setting
drawables on a Button class (subclass of TextView), the image IS NOT
resized and you cannot set scaling/cropping policy like you can do
with the ImageButton class (which is a subclass of ImageView).
Assuming you have a Drawable called "thumb" and you want to place the
thumb to the left of the text:

thumb.setBounds(new Rect(0,0,desired_width,desired_height));
customButton.setCompoundDrawables(thumb,null,null,null);


Personally I would go with #3 Since I'll be able to create the Button
cleanly in a custom BaseAdapter. And there's already a mechanism for
placing an image beside the text AND ways to handle clicking.

Hopes this helps

Jurnell

On Sep 1, 1:17 pm, kivy <[email protected]> wrote:
> Hi there,
>
> in my application I am using theGridViewas a video gallery (videos
> are shown as thumbs). Now I would like to add abuttonto the options
> menu, with which you can switch to a ListView. In the ListView you
> should be able to see (smaller) thumbs as well as the video name.
>
> But I am a little stuck and don't really know how I can show both the
> video thumbs and the names in the ListView.
> If anyone could give me a hand here, that would be really great.
>
> Cheers.

-- 
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