Android Question B4XSearchTemplate - strange List-behavior - Bug?

Herbert32

Active Member
Licensed User
Longtime User
Hello together,

actually I'm facing a problem on which maybe someone of you can help me to solve this problem.

I use the B4Xsearchtemplate filled with 300 items which are shown in multiline correct until i start to type my search-text.

As soon as i type my search-text, the visible lines-count of each item are varying with each new character, I type in the search-field.

If you take a look into the attached pictures, the happend behavior should be clear, even if I did not found the exact words to explain



Does someone have an Idea, why this happens and how i can solve this problem?

THX in advance
 

Attachments

  • WhatsApp Image 2024-11-12 at 10.49.13 (1).jpeg
    114 KB · Views: 38
  • WhatsApp Image 2024-11-12 at 10.49.13 (2).jpeg
    126.9 KB · Views: 31
  • WhatsApp Image 2024-11-12 at 10.49.13.jpeg
    139 KB · Views: 50
Last edited:

Herbert32

Active Member
Licensed User
Longtime User
This is how the b4xSearchTemplate is working.
It lists all matching Entries.
yes - but it should not reduce the visible lines inside an item in the list of matching items

look at the first item, which starts with '1 Schutzgasschweißgerät....' :

typing 'bac' there are 6 lines visible
typing 'ba' there are 2 lines visible
typing 'back' there are 3 lines visible
typing 'backs' there are 2 lines visible
typing 'backst' there are 3 lines visible
 
Upvote 0

teddybear

Well-Known Member
Licensed User
Obviously, all of these items which shown contain the search key, some keys of them are just out of the visible range of the item. you can check them.
such as
 
Last edited:
Upvote 0

Herbert32

Active Member
Licensed User
Longtime User
Obviously, all of these items which shown contain the search key, some keys of them are just out of the visible range of the item. you can check them.
such as
View attachment 158556
yes - i know this - the value of the item is correct but the 'visible range', which i called 'visible lines' always changes for the matched items with each character i add to the search-field.

this for sure is not the expected behavior.

the user needs to see the complete text of each matched item to be able to select the correct one by touching the item in the list.

initially after .setitems all items are in the correct size - but after the first character in search-field the height of the items changes - also after removal of all characters in the searchfield the height of the items is different from original

i tried to modify b4xsearchtemplate.bas but without acceptable success.
 
Upvote 0

teddybear

Well-Known Member
Licensed User
i tried to modify b4xsearchtemplate.bas but without acceptable success.
Try this b4xsearchtemplate.bas, is it the behavior you want ?
 

Attachments

  • B4XSearchTemplate.bas
    7.8 KB · Views: 10
Last edited:
Upvote 0

teddybear

Well-Known Member
Licensed User
initially after .setitems all items are in the correct size - but after the first character in search-field the height of the items changes - also after removal of all characters in the searchfield the height of the items is different from original
I have no the items data, just extract them from your pictures. the behavior is you want? some characters or removal of all characters in search field the height of the items does not change.


 

Attachments

  • 4.png
    60.7 KB · Views: 1
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…