"YOU AND THE ART OF ONLINE DATING" is the only product on the market that will take you step-by-step through the process of online dating, provide you with the resources to help ensure success. Get it now!
If so you might take a look at curious-creature.org/2008/12/22/why-is-m... it boils down to setting android:cacheColornt attribute of your list to the background color. Maybe that will help.
If so you might take a look at curious-creature.org/2008/12/22/why-is-m... - it boils down to setting android:cacheColornt attribute of your list to the background color. Maybe that will help. Edited after further discussion: I think you need to call getAdapter().
NotifyDataSetChanged() on the List rather than invalidate(). List is really build in the way that it is relying on adapter to provide the data. What you are doing in fact you have an implicit adapter - Entry is really kept in the adapter and by setting checked, you are changing the data model really, but if you do not call notifyDataSetChanged() the list does not really know that the model has changed and will not recreate the views (invalidate() will only redraw the existing ones).
The background is a state-list-drawable that I created from XML. For some reason, I couldn't get the state_checked state working, so I implemented a separate state list drawable called listview_checked, then switch the resources in the code. Unfortunately, this cacheColornt attribute did not affect anything, and the link was a good read but I think unrelated to my issue.It's confusing because changing the background drawable from within the onItemClickListener works fine.
Thanks for the interesting link though. – John Jul 1 at 22:16 I think you would do better then by not changing background, but by simply adding a "checked color" "fill_parent" view to your list item and make it VISIBLE/INVISIBLE when state changes to checked/unchecked – Jarek Potiuk Jul 1 at 22:21 even after this change (VISIBLE / INVISIBLE switching), the views aren't changing the background.Hm, I'll keep working at it. – John Jul 1 at 23:43 I think you need to call getAdapter().
NotifyDataSetChanged() on the List rather than invalidate(). List is really build in the way that it is relying on adapter to provide the data. What you are doing in fact you have an implicit adapter - Entry is really kept in the adapter and by setting checked, you are changing the data model really, but if you do not call notifyDataSetChanged() the list does not really know that the model has changed and will not recreate the views (invalidate() will only redraw the existing ones).
Updating the answer. – Jarek Potiuk Jul 1 at 8:03 Unfortunately, this was the first thing I tried, and yet it still did not update the fields. The ListView adds and deletes rows OK with notifyDataSetChanged, but the code to hide / show the correct background still didn't get called.
I did find a solution though, I'll post it below. – John Jul 1 at 16:10.
After trying everything (thanks for your help Jarek), I found a solution that works for my purposes. Instead of implicitly calling the setChecked() within the view that was clicked, I leave it up to the setItemChecked() method within the ListView class. My updated code: private void deselectAll() { for (int I = 0; I SetItemChecked(i, false); } } My best guess is that the ListView knows that its items implement the Checkable class, and thus requires itself to be the handler of all item operations.
Something along those lines. If anyone can explain in more detail why this solution works while the others did not, I'll reward them with the answer and an upvote.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.