• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

ListView filter only matching first entry, not filtering the rest.  RSS feed

 
Ranch Hand
Posts: 50
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've managed to successfully (albeit broken) a filter for a ListView. It only filters the FIRST entry, and disregards the rest. Can anyone tell me what I'm missing?

I am so close to getting this!!!

Screenshots included below.

Here are the two methods that do the work:

BeforeFilterAttempt.png
[Thumbnail for BeforeFilterAttempt.png]
Before typing in filter. Notice Three Roses and One Dandelion
AfterTypingLetterR.png
[Thumbnail for AfterTypingLetterR.png]
Only TWO roses show up. There are THREE!
AfterTypingLetterD.png
[Thumbnail for AfterTypingLetterD.png]
There is ONE Dandelion, but NOTHING shows up! :-(
 
Bartender
Posts: 1210
25
Android C++ Java Linux PHP Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't break out of the for loop on first mismatch. Let the matching proceed for all plants.
 
Christopher Sheridan
Ranch Hand
Posts: 50
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That did not fix it. Still digging.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!