Android Question Highlight search text Part 2

Enthousiastic

Active Member
Licensed User
I converted the FilterSearch routine in line 151 ( as in attached zip ) from the xCLV LL
Invoice tutorial to highlight search results, but it does not work
I do not know the reason.
I tried some nights but in vain. Any help would be welcome. Thank you very much in advance
all of you in the forum.
 

Attachments

Mahares

Well Known Member
Licensed User
I tried some nights but in vain
I made a few modifications to your project to make it highlight the typed search text in the customlistview using RichString which you were trying to implement. I focused mostly on making RichString highlight for you any typed characters in the search. The search is limited to the Company column only. The Company column is made up of the first and last name as you have them concatenated in the queries. You may of course improve some of your project other features
I used B4A Example as the label name and b4a.example as the package name.

One of the main changes is the Type declaration of Customer from String to RIchString :
From:
B4X:
Type InvoiceData (InvoiceId As Int, Customer As String, Country As String, InvoiceDate As String, Total As Double)
to
B4X:
Type InvoiceData (InvoiceId As Int, Customer As RichString, Country As String, InvoiceDate As String, Total As Double)
 

Attachments

Mahares

Well Known Member
Licensed User
A small conversion (the RichString) did all the work
That is only one of the changes. By itself, it will not do anything. You can see all the changes in the project as I have preceded them or followed them with a the word: mahares. Search for mahares in the project you will see them.
 

Enthousiastic

Active Member
Licensed User
Yes I saw the changes in lines 105-120, thanks a lot again. Obviously, if one wants to extend the search to other fields, in addition to the correction of sql statements , one must change from string to richstring the corresponding ones in InvoiceData.
 
Top