Recent

Author Topic: LAMW: jListView - HighLightSelectedItemColor  (Read 12807 times)

jmpessoa

  • Hero Member
  • *****
  • Posts: 2302
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #15 on: May 30, 2017, 01:12:16 am »

Well, the bug need be fixed!

Thank you!

Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

jmpessoa

  • Hero Member
  • *****
  • Posts: 2302
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #16 on: May 30, 2017, 05:29:19 am »

Fixed!

just set property "HighLightSelectedItemColor" <> "colbrDefault"

warning: the old  property "HighLightSelectedItem: boolean" was droped!

Thank You!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #17 on: May 31, 2017, 11:28:07 am »
Awesome, thank you, I will update it later.
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #18 on: June 04, 2017, 06:33:36 pm »
Sorry for the delay, it works and highlights the item using the background color, before it would only change the item font color.

I did notice something though, on occasions when HighlightSelectedItemColor is selected, it sometimes stops the OnClickItem from functioning, I have noticed this more when there is one item left in the List.
I have had to stop using the HighlistSelectedItemColor for now until this is resolved, sorry.  :(
« Last Edit: June 04, 2017, 07:01:16 pm by c4p »
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

jmpessoa

  • Hero Member
  • *****
  • Posts: 2302
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #19 on: June 04, 2017, 10:25:29 pm »
Quote
... it works and highlights the item using the background color, before it would only change the item font color.

Yes, item text now can be expanded in "multiples" texts! 

sintaxe:

leftText(center|text)rightText

and set the property

ItemLayout = layText

NOTE: if ItemLayout <> layText  THEN in the absence of image [or widget] leftText/rightText will be used to
replace its!

Ok. I will try [and fix] the "one item" click bug!

Thank you!

[EDITED] In my test I found that one item "click" is OK, for many click . But, yes, the  "highlight" do not toggle.   Should?
« Last Edit: June 05, 2017, 02:40:11 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #20 on: June 05, 2017, 10:13:33 am »
On my app when the jListView highlight color is set, sometimes (not always) the item click will not work, just restoring back to default color allows item click to work every time.
Seems random, try after a reload of the list with different item length, which is what I am doing. I will do some more testing to see if it is localised. I will also try replacing the jListView component on the form which seemed to work the last time, even after doing a cleanup/build.
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

jmpessoa

  • Hero Member
  • *****
  • Posts: 2302
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #21 on: June 06, 2017, 02:22:32 am »
Well, seeing the new behavior [the highlight is now in the item background not in text caption] ,
my test is OK.  My picture test is attached.

On the other hand, I do some jListView improved to support  the new text syntax
leftPart(Center|Part)rightPart  on "OnDrawItemTextColor" event handle...

There is a new demo "AppListViewDemo3"!

ref.   https://github.com/jmpessoa/lazandroidmodulewizard

Thank you!
« Last Edit: June 06, 2017, 02:25:21 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #22 on: June 06, 2017, 11:14:35 am »
(Edit)
Mine does this too, but on occasions it does to allow OnClickItem to function when HighLightSelectedItemColor is changed to anything other than cobrdefault.

Specifically happens when HighLightSelectedItemColor is set to a color other than corbrDefault:

Works if:
- If you load the app and list all the items (without touching/selecting any items) then filter the list during runtime to say two items/rows and select an item, it will work and highlights the item OK.

Does not work if:
- Load up the list with your items, select an item, this part works OK
- Shorten the list during runtime i.e. filtering down to say two items/rows then the OnClickItem does not work and no item highlights.
« Last Edit: June 06, 2017, 01:18:08 pm by c4p »
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #23 on: June 06, 2017, 12:43:17 pm »
I noticed that open and closed brackets (  ) are being stripped from jListView and replaced with spaces, but if you apply other open and closed brackets within the original open and closed brackets these secondary ones appear OK. I tried various other characters and only the open/closed brackets seemed to be stripped and replaced with spaces (nothing set in the delimiter), anything before the brackets defaults to original default font color.
Hope this makes sense.
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

jmpessoa

  • Hero Member
  • *****
  • Posts: 2302
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #24 on: June 06, 2017, 05:28:40 pm »

Quote
I noticed that open and closed brackets (  ) are being stripped from jListView and replaced with spaces, but if you apply other open and closed brackets within the original open and closed brackets these secondary ones appear OK.

Yes, "closed brackets (  )"  are defaults

but you you can change its!

go to to form "OnJINIPrompt" and do:

Code: Pascal  [Select][+][-]
  1. procedure TAndroidModule1.AndroidModule1JNIPrompt(Sender: TObject);
  2. begin
  3.    jListView1.SetLeftDelimiter('{');   //or other
  4.    jListView1.SetRightDelimiter('}'); //or other
  5. end;
  6.  
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #25 on: June 06, 2017, 05:58:46 pm »
Yes, "closed brackets (  )"  are defaults

Ah yes, got it!
Thank you.
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

jmpessoa

  • Hero Member
  • *****
  • Posts: 2302
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #26 on: June 06, 2017, 06:19:43 pm »
Yes, and you can continue with the old syntax, too:

"Item 1"

or

"Item 1|subItem 1"
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #27 on: June 11, 2017, 11:34:36 am »
I have disabled the HighlightSelectedItemColor due to the anomaly I have in my app:

Works if:
- If you load the app and list all the items (without touching/selecting any items) then filter the list during runtime to say two items/rows and select an item, it will work and highlights the item OK.

Does not work if:
- Load up the list with your items, select an item, this part works OK
- Shorten the list during runtime i.e. filtering down to say two items/rows then the OnClickItem does not work and no item highlights.
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

jmpessoa

  • Hero Member
  • *****
  • Posts: 2302
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #28 on: June 13, 2017, 02:27:13 am »

Quote
...Shorten the list during runtime i.e. filtering down to say two items/rows then the OnClickItem does not work and no item highlights.

Can you, please, post here a minimal project to test?
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #29 on: June 15, 2017, 08:57:17 am »
I will try and do it this weekend.
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

 

TinyPortal © 2005-2018