I notice that if setSelection(0) is called just before
notifyDataSetChanged() it doesn't work - i.e. its as if setSelection
(0) didn't do anything.
However, switching the calls around works for me.
On Oct 9, 11:49 am, Romain Guy wrote:
> > 1. Does this still work if the list is empty? The docs
> 1. Does this still work if the list is empty? The docs don't specify.
Yes.
> 2. Is this better than just resetting the adapter?
Much much much much much more efficient.
>
> On Oct 9, 11:27 am, Romain Guy wrote:
>> setSelection(0)
>>
>> On Thu, Oct 8, 2009 at 8:14 PM, westmeadboy wrote:
>>
Thanks.
1. Does this still work if the list is empty? The docs don't specify.
2. Is this better than just resetting the adapter?
On Oct 9, 11:27 am, Romain Guy wrote:
> setSelection(0)
>
> On Thu, Oct 8, 2009 at 8:14 PM, westmeadboy wrote:
>
> > I have a ListView which displays the results of
setSelection(0)
On Thu, Oct 8, 2009 at 8:14 PM, westmeadboy wrote:
>
> I have a ListView which displays the results of some search.
>
> When the user makes a new search I repopulate the underlying Array of
> an ArrayAdapter and call notifyDataSetChanged(). However, if the user
> has previously s
4 matches
Mail list logo