Now I have workaround like this

private void setSafeAdapter(AbsListView view, BaseAdapter adapter){
        if(view instanceof ListView){
            ((ListView)view).setAdapter(adapter);
        }else{
             view.setAdapter(adapter);
        }
    }

On Fri, Mar 25, 2011 at 5:14 PM, pawpaw17 <[email protected]> wrote:

> Sergey,
>
> I'm having the same problem, and it just started after I upgraded to
> API 11.
>
> Notice this:
>
> ------------------------------
> void android.widget.AbsListView.setAdapter(ListAdapter adapter)
>
> public void setAdapter (ListAdapter adapter)
> Since: API Level 11
> Sets the adapter that provides the data and the views to represent the
> data in this widget.
>
> Parameters
> adapter  The adapter to use to create this view's content.
> -------------------------
>
> Note the API Level 11. Are you only seeing the crash on older phones?
> Why is this method limited to API 11 when it used
> to work fine with the older APIs ???
>
> Can anyone shed light? I guess our only solution is to work around.
> Any ideas? This causes a regression from past
> behavior for me, so I think this is and Android bug.
>
>
>
> On Mar 22, 11:56 am, TreKing <[email protected]> wrote:
> > Yeah, that doesn't help much. Guess you'd have to look at the source to
> see
> > what it's doing at that point.
> >
> >
> ---------------------------------------------------------------------------­----------------------
> > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> > transit tracking app for Android-powered devices
>
> --
> 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
>



-- 
Sergey A. Okhotny
Skype:okhotny / G-Talk:[email protected]
Phone:+380 (68) 322-0338

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