Greetings,

I want to re-use 1 adapter (similar to well known ImageAdapter from
samples) with 2 different views - Gallery and GridView.

I need to specify LayoutParams for the each View returned by getView()
method of my adapter. In case of Gallery it should be instance of
Gallery.LayoutParams, and in case of GridView it should be
GridView.LayoutParams. I'll get an exception for sure if I'll try
Gallery.LayoutParams with GridView and vice versa.

What is the best way to do that? Can I somehow use "parent" parameter
(ViewGroup parent) for that?

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

Reply via email to