• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Christopher Sheridan
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! :-(
 
Karthik Shiraly
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic