Hi,
In a particular row of listview i want a custom view.
For ex: in getView() method
we have
@Override
public View getView(int position, View convertView, ViewGroup
parent) {
View retval = LayoutInflater.from(parent.getContext()).inflate(
R.layout.listin_list, null);
TextView title = (TextView) retval.findViewById(R.id.text);
ImagevIew img =(Imageview)retval.findViewById(R.id.image);
img.setImageResource(mThimdIds[posiiton]);
customGalleryView custom =(customGalleryView
)retval.findViewById(R.id.custom);
custom.setAdapter(new ImageAdapter(this)); /// I am not
able to do this .......
title.setText("CATEGORY");
return retval;
}
in my listin_list.xml
i have
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:orientation="vertical"
android:layout_height="wrap_content">
<TextView
android:id="@+id/text"
android:textColor="#000"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<ImageView
android:id="@+id/image"
android:textColor="#000"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<com.android.project.customGalleryView
android:id="@+id/custom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
How to inflate the customGalleryView in listin_list.xml.
and setAdapter(new ImageAdapter(this));
On Tue, Aug 16, 2011 at 6:40 PM, Ratheesh Valamchuzhy
<[email protected]>wrote:
> Hi
>
> R U saying about the custom list view(each row of a list view is different
> from normal litstview, it have some images , colors etc)
>
> or
>
> clicking a particular row of a list , u need a different view to display
>
>
>
> plse make more clear///////
>
>
> thanks
>
> --
> 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
>
--
Regards,
Vani Reddy
--
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