Recent

Author Topic: LAMW: jAutoTextView List view font  (Read 4220 times)

c4p

  • Full Member
  • ***
  • Posts: 158
LAMW: jAutoTextView List view font
« on: July 25, 2017, 04:15:39 pm »
What would cause jAutoTextView string item list always come up with white text font on a white background? or how can you set the font on the items string list? Works OK in the demo app and shows font as black there but in my app it is white font on white background  :o
Also opened new project and is the same there, but fine on the demo app?  %)

Absolutely love this component though, need a workaround so I can use it in my app, can't find any way to set the list font to black?
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: jAutoTextView List view font
« Reply #1 on: September 19, 2017, 09:41:29 am »
Hmmm, works fine on J3 but not S4, white font on white background on dropdown (theme?), could we have a similar DroplistTextColor & DropListBackgroundColor like on jComboEditText comp?
This would be a lifesaver for me and reduce the number of components on screen for me.  :)
« Last Edit: September 19, 2017, 10:10:09 am 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: jAutoTextView List view font
« Reply #2 on: September 19, 2017, 11:57:27 pm »
Trying to change the jAutoTextView for dropListTextColor and DropListBackgroundColor.
Managed to get .pas working for jAutoTextView with droplist Text/BackgroundColor but got lost in the .java file  :(
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: 2301
Re: LAMW: jAutoTextView List view font
« Reply #3 on: September 20, 2017, 12:51:03 am »

Quote
(theme?)

Yes!

You can see/change here:  "....\res\values" 

and "....\res\values-v11"
and ".....\res\values-v14"
and ".....\res\values-v21"
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: jAutoTextView List view font
« Reply #4 on: September 20, 2017, 10:05:57 pm »
Would ideally want to change droplist background & text color, rather than playing with the theme?
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: jAutoTextView List view font
« Reply #5 on: September 20, 2017, 10:16:29 pm »
jmpessoa, if you have time, I would really appreciate droplist background and font color added to jAutoTextView, this would be really useful in my app as it searches while you are typing, very useful, but on some phones shows white font with white background.   :(
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: 2301
Re: LAMW: jAutoTextView List view font
« Reply #6 on: September 20, 2017, 10:34:22 pm »

Quote
Would ideally want to change droplist background & text color, rather than playing with the theme?

Yes, but the java API  "AutoCompleteTextView" do not support [directly] this....
Ok, in programming "all is possible" but I do not know how long I can do this yet....]

About theme: 

Go to your application folder  "....res\values-21"
the variant is here:
Quote
    <style name="AppBaseTheme" parent="android:Theme.DeviceDefault">

compare with the file "styles.xml" from demo "AppAutoCompleteTextViewDemo1"   
["....res\values-??"]

the variant is here:
Quote
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">

So, you can try a simple change....
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: jAutoTextView List view font
« Reply #7 on: September 20, 2017, 11:15:22 pm »
OK, I will try this, 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

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: jAutoTextView List view font
« Reply #8 on: September 20, 2017, 11:45:43 pm »
Works OK on Material Theme but this is v5.0 (API 21) onwards, a workaround I suppose.
Material is grey though and need to get it darker, ideally black  :)
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: 2301
Re: LAMW: jAutoTextView List view font
« Reply #9 on: September 21, 2017, 12:43:24 am »

What about mimic "folders and content"  of demo  "AppAutoCompleteTextViewDemo1"  ???
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: jAutoTextView List view font
« Reply #10 on: September 21, 2017, 08:26:39 am »
Too light/bright unfortunately for the app, I want a dark background.
Using Material Theme on API21 works great with these style.xml parameters :

<resources>
  <style name="AppBaseTheme" parent="android:Theme.Material">
    <item name="android:windowBackground">@color/primaryDark</item>
  </style>
  <color name="primaryDark">#111111</color>
</resources>
« Last Edit: September 21, 2017, 08:34:48 am 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

 

TinyPortal © 2005-2018