bencoder wrote:
> Hi all,
> 
> I built an app to show a ListView with different layout of each row
> within it.
> I extend BaseAdapter to construct my own adapter class and override
> its getView() method.
> In getView() method, I use
> 
>           view = mInflater.inflate(mResource, parent, false);
> 
> to obtain which layout xml file that be needed to generate different
> layout for each row.
> 
> After coding and running, the problem occurs.
> While I'm scrolling the list, this app crashes and pop-up an warning
> dialog that says
> 
>           "The application has stopped expectedly. Please try again."
> 
> If I use the same layout xml file to enable each row has the same
> layout, everything is all right.
> Does somebody has any ideas about that?

Your stack trace of the exception (via adb logcat, DDMS, or the DDMS
perspective in Eclipse) would probably give you more information.

Taking a guess, though...did you override getViewTypeCount() and
getItemViewType() in your adapter? You need to tell Android about the
multiple row types via those methods, otherwise its recycling algorithms
will assume they are all the same.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Training in Germany, 18-22 January 2010: http://bignerdranch.com

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