On Sat, Jul 14, 2012 at 10:41 AM, user123 <[email protected]> wrote: > I need 2 different item types in a Gallery. They are quite similar, but have > a different background and different font in one textview. > > How do I do it? I tried inflating with different XML, and also changing the > view programmatically, and in both cases, it works, but after scrolling a > while, all items get the same layout.
You probably forgot to override getViewTypeCount() and getItemViewType() on your Adapter. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.8 Available! -- 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

