Transparent layouts

323 views
Skip to first unread message

MyScripts

unread,
Jan 13, 2021, 4:58:58 AM1/13/21
to DroidScript
Hello, after i updated Droidscript to 2.02. The layouts are getting transparent, someone know why?

Steve Garman

unread,
Jan 13, 2021, 6:43:09 AM1/13/21
to DroidScript
I'm not sure exactly what behaviour you are seeing. Perhaps you could post some code that demonstrates the problem.

The main theme of DroidScript has changed from v2. Do you get the sort of layout you want if you put this at the top of your code?

cfg.Holo

MyScripts

unread,
Jan 13, 2021, 3:24:43 PM1/13/21
to DroidScript
Look this video.
Screen_Recording_20210113-172335.mp4

Steve Garman

unread,
Jan 13, 2021, 4:02:03 PM1/13/21
to DroidScript
What values are you using for SetBackColor?

Did this look different in a previous version of DroidScript?

Have you tried cfg.Holo ?

MyScripts

unread,
Jan 13, 2021, 6:19:06 PM1/13/21
to DroidScript
Hi, i tried cfg.Holo but nothing happens. I'm using "white" at SetBackColor, the colors blue, yellow and green on video are for demonstration.

MyScripts

unread,
Jan 13, 2021, 6:23:32 PM1/13/21
to DroidScript
In the old version all it's ok, but after update i'm getting this problem 

Steve Garman

unread,
Jan 14, 2021, 2:56:41 AM1/14/21
to DroidScript
I can't replicate the problem here but I still haven't seen any code from you so I may be missing something

Is it possible for you to post the code you used to create the video?

An SPK file would be ideal but you can just post the code in a message if that's difficult.

Alan Hendry

unread,
Jan 14, 2021, 8:45:30 AM1/14/21
to DroidScript
Hi,
In the previous version and in V2 I coded drawers that by default were transparent.
I specified backcolor as "#ff000000" (first two f's specify alpha as completely opaque, then 000000 is black).
Opaque white would be "#ffffffff"
Hope this helps you work-around it.
Regards, ah

Message has been deleted

MyScripts

unread,
Jan 18, 2021, 7:14:41 PM1/18/21
to DroidScript
Hello, Here is a part of the code, if you have things that don't match don't worry because it was cut just to create spk
AAAAA Copy.spk

Steve Garman

unread,
Jan 18, 2021, 11:46:47 PM1/18/21
to DroidScript
It is caused by all those lines in your code like
  laySlideK.SetEnabled( false );

I suggest you search your code for setenabled and remove them.

I can't think of a good reason for any layout to use SetEnabled. 

MyScripts

unread,
Jan 19, 2021, 5:04:19 AM1/19/21
to DroidScript
Ok thanks, I'll fix it!

MyScripts

unread,
Feb 3, 2021, 6:57:43 PM2/3/21
to DroidScript
Hello again, how can I use .setenabled without getting transparent?

Alan Hendry

unread,
Feb 4, 2021, 6:37:19 AM2/4/21
to DroidScript
Hi,
Perhaps you could explain what you are trying to achieve then we could advise better.
Layouts have methods Hide (contents hidden, space on screen still held), Gone (contents hidden, space on screen is released),
Show (shows layout again, works after Hide, works after Gone).
And you can Hide and Gone and Show individual controls.
Also you can change the background and text colours (inactive controls are usually greyed out) 
and change the OnTouch (or OnTouchDown, etc) to do nothing, then change the colours and OnTouch back to activate again. 
Finally individual controls have the method SetEnabled
"En/Disable the control physically and visually so that the user can/can not access the control. Events like OnTouch will still be fired."
Hope this helps.
Regards, ah

MyScripts

unread,
Feb 4, 2021, 4:52:25 PM2/4/21
to DroidScript
i'm using SetEnabled in a EditText. When the SetEnabled is disabled, the user can't edit the text. But it's getting transparent.

Alan Hendry

unread,
Feb 5, 2021, 6:18:09 AM2/5/21
to DroidScript
Hi,
After 
SetEnabled(false)
I added 
SetBackColor("#ff999999") 
And it seemed to work.
The first two f's are the alpha and tell it to be opaque, and 999999 tells it to be grey.
Regards, ah

Gurudas Gaonkar

unread,
Mar 15, 2025, 3:28:44 PM3/15/25
to DroidScript
1000632576.png
AAAAA NEW.spk

Gurudas Gaonkar

unread,
Mar 16, 2025, 1:50:28 PM3/16/25
to DroidScript
*Correct code spk*
AAAAAA NEW.spk
Reply all
Reply to author
Forward
0 new messages