I'm interested in customizing the Gallery control by adding a text
description below each image.  I've created a view as such:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
  xmlns:android="http://schemas.android.com/apk/res/android";
  android:layout_width="wrap_content"
  android:layout_height="wrap_content">
  <ImageView
        android:id="@+id/ImageViewIcon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
  />
  <TextView
        android:id="@+id/TextViewDescription"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/ImageViewIcon"
        android:layout_centerHorizontal="true"
  />
</RelativeLayout>

My question is can I override the default Gallery view by injecting
this view in place of the image?

I have a custom adapter currently, and was trying to do something
like:

@Override
public View getView(int position, View convertView, ViewGroup parent)
{

                convertView = View.inflate(context, R.layout.iconlayout, 
parent);

                ImageView i = (ImageView)
convertView.findViewById(R.id.ImageViewIcon);
                i.setImageDrawable(appList.get(position).getIconDrawable());
....


But I can't seem to get that to work..  Thanks for any help you can
provide.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to