Mark has been repeatedly saying don't call getview
Adding to it, your call to adapt.notifyDataSetChanged(); is what's going to
trigger a getView() call for each of the items visible in your list. So some
internal code in listview widget is what's going to call getview, not the
user(you). However
Okay like where do u gets getView I dont see that function in the
Listview class or the adapterView class so im not really sure where im
suppose to be able to call getView.
On Dec 1, 7:54 pm, Prakash Iyer thei...@gmail.com wrote:
My 2c - you are over-complicating this.The getView is ONLY to
On Thu, Dec 2, 2010 at 2:06 PM, kiros88 ghui...@gmail.com wrote:
Okay like where do u gets getView I dont see that function in the
Listview class or the adapterView class so im not really sure where im
suppose to be able to call getView.
Generally, you do not call getView(). You implement
Okay wait so i get the concept tthat u do a getView from an
ArrayAdapter but what i tried this before during the
i called the adapter i used
ArrayAdapter adapt = new
ArrayAdapterString(this,android.R.layout.simple_list_item_1 ,
songs);
then after its already created i do
public void
Of course. Again, ordinarily, you do not call getView().
You are going about your problem in the wrong way. You are attempting
to change your UI directly by grabbing some row out of a ListView and
changing it. That's not going to be reliable at all, since that row
might not exist. Rather, you
Admittedly, I haven't read this thread in detail. It seems to me, that using
an MVC approach is called for. The controller (the click handler) shouldn't
be calling the view directly. The controller should call the model. The
model will update the view accordingly.
--
You received this message
You need to do setText in your implementation of getView. In the item
clicked, store your state and call notifyDatasetChanged (check the exact
name). Do not call getView...
On Dec 2, 2010 2:18 PM, kiros88 ghui...@gmail.com wrote:
Okay wait so i get the concept tthat u do a getView from an
Okay so i guess this kinda makes sense I'm not really sure how am i
suppose to change my data model. I did
((TextView)adapt.getView(0, null, parent)).setText(hello);
adapt.notifyDataSetChanged();
but nothing changed ?
On Dec 2, 11:28 am, Mark Murphy mmur...@commonsware.com wrote:
Of course.
On Thu, Dec 2, 2010 at 3:05 PM, kiros88 ghui...@gmail.com wrote:
Okay so i guess this kinda makes sense I'm not really sure how am i
suppose to change my data model. I did
((TextView)adapt.getView(0, null, parent)).setText(hello);
adapt.notifyDataSetChanged();
but nothing changed ?
You did
Its probably a bad idea to play with any View managed by the Adapter
other than the one that is passed to onItemClick() or to getView().
So the idea that you find view + 1 is not going to work. There is
lots of tricky View pool activity behind the scenes so you can't make
any assumptions about
10 matches
Mail list logo