runOnUiThread is your friend for this situation :
http://code.google.com/android/reference/android/app/Activity.html#runOnUiThread(java.lang.Runnable)
Emmanuel
http://androidblogger.blogspot.com/
On Feb 4, 7:04 pm, cindy wrote:
> I figure out the problem.
>
> You can't change any UI in the thr
I figure out the problem.
You can't change any UI in the thread your create. Android require you
to update UI in UI thread.
On Feb 3, 11:27 pm, cindy wrote:
> I implemented the async incoming data on a separate thread which adds
> the items to a ArrayList that is connected to the view through m
In your adapter class u will be having the constructor something like this:
public class MyAdapter extends BaseAdapter{
private List myList;
public MyAdapter(Context context, int rowResID,
List myList)
this.myList= myList;
I implemented the async incoming data on a separate thread which adds
the items to a ArrayList that is connected to the view through my
custom
adapter (inherits BaseAdapter). But when I modified the ArrayList, the
application crashes.
Have you have the same problem?
On Feb 3, 5:03 pm, Emmanuel
notifyDataSetChanged().
On Wed, Feb 4, 2009 at 6:33 AM, Emmanuel wrote:
>
> Do you mean the data from your adapter has changed, and you want to
> update your list from this ?
>
> To achieve this result, I create the adapter from the new data, and
> reset it to the list.
> There should be another
Do you mean the data from your adapter has changed, and you want to
update your list from this ?
To achieve this result, I create the adapter from the new data, and
reset it to the list.
There should be another cleaner method, but this is works for me !
Emmanuel
http://androidblogger.blogspot.co
6 matches
Mail list logo