Recent

Author Topic: LAMW - skin in lamw is possible ?  (Read 255 times)

juank1971

  • Jr. Member
  • **
  • Posts: 81
LAMW - skin in lamw is possible ?
« on: November 19, 2020, 09:45:42 pm »
hi,
 it is possible to put a skin in lamw, or to be able to change colors of labels, jtoolbar buttons etc. or some demo that does something similar

Segator

  • Full Member
  • ***
  • Posts: 123
    • https://github.com/Nenirey
Re: LAMW - skin in lamw is possible ?
« Reply #1 on: November 20, 2020, 01:40:26 pm »
Hi juank1971, look the attached screenshot, this was only changing the background color at run time for some components, one missing part is: how to change the color like the system colorize the top system bar (where the phone show notification, clock, batterie..)?
i am Reinier, Nenirey and Segator :) https://github.com/Nenirey

jmpessoa

  • Hero Member
  • *****
  • Posts: 1663
Re: LAMW - skin in lamw is possible ?
« Reply #2 on: November 20, 2020, 05:01:08 pm »
Quote
how to change the color like the system colorize the top system bar (where the phone show notification, clock, batterie..)?

Go to your project folder  "...\res\values"  and try  edit the file "colors.xml"

(do some google search to find the android color semantics....)
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Segator

  • Full Member
  • ***
  • Posts: 123
    • https://github.com/Nenirey
Re: LAMW - skin in lamw is possible ?
« Reply #3 on: November 20, 2020, 05:17:25 pm »
But is not posible to change at runtime? or a way to loads diferents colors.xml files from assets in runtime mode?
i am Reinier, Nenirey and Segator :) https://github.com/Nenirey

jmpessoa

  • Hero Member
  • *****
  • Posts: 1663
Re: LAMW - skin in lamw is possible ?
« Reply #4 on: November 20, 2020, 07:09:20 pm »
Quote
But is not possible to change at runtime?

Yes, but we need search for the android APIs and improve the LAMW framework....

Quote
or a way to loads different colors.xml files from assets in runtime mode?

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

Segator

  • Full Member
  • ***
  • Posts: 123
    • https://github.com/Nenirey
Re: LAMW - skin in lamw is possible ?
« Reply #5 on: November 20, 2020, 07:21:30 pm »
a make some search and found this https://stackoverflow.com/questions/4761686/how-to-set-background-color-of-an-activity-to-white-programmatically

Get a handle to the root layout used, then set the background color on that. The root layout is whatever you called setContentView with.

Code: Pascal  [Select][+][-]
  1. setContentView(R.layout.main);
  2.  
  3.   // Now get a handle to any View contained
  4.   // within the main layout you are using
  5.   View someView = findViewById(R.id.randomViewInMainLayout);
  6.  
  7.   // Find the root view
  8.   View root = someView.getRootView();
  9.  
  10.   // Set the color
  11.   root.setBackgroundColor(getResources().getColor(android.R.color.red));
i am Reinier, Nenirey and Segator :) https://github.com/Nenirey

jmpessoa

  • Hero Member
  • *****
  • Posts: 1663
Re: LAMW - skin in lamw is possible ?
« Reply #6 on: November 20, 2020, 07:37:27 pm »

But this you already can do.... many LAMW components have colors properties.

We need "system" color not view color...
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Segator

  • Full Member
  • ***
  • Posts: 123
    • https://github.com/Nenirey
Re: LAMW - skin in lamw is possible ?
« Reply #7 on: November 20, 2020, 09:17:37 pm »
Quote
We need "system" color not view color...

i see
i am Reinier, Nenirey and Segator :) https://github.com/Nenirey

 

TinyPortal © 2005-2018