Shadow&Max Active Member Licensed User Longtime User Mar 30, 2014 #1 I need to change a label's opacity (Alpha) from transparent to opaque and back during execution. Is that possible??? If so, how? I can't seem to find a way to do it...
I need to change a label's opacity (Alpha) from transparent to opaque and back during execution. Is that possible??? If so, how? I can't seem to find a way to do it...
HotShoe Well-Known Member Licensed User Longtime User Mar 30, 2014 #2 You can set its color using argb: label1.color = colors.argb(128,0,0,144) The first parameter id the alpha value from 0 - 255. --- Jem Upvote 0
You can set its color using argb: label1.color = colors.argb(128,0,0,144) The first parameter id the alpha value from 0 - 255. --- Jem
Shadow&Max Active Member Licensed User Longtime User Mar 30, 2014 #3 Thanks Jem... I've been working with stock colors, that I assign on the run, and have no idea how to get the RGB value of a stock color... I know the Alpha setting, but don't know the RGB value... Is there a way to extract that RGB from a standard color? Upvote 0
Thanks Jem... I've been working with stock colors, that I assign on the run, and have no idea how to get the RGB value of a stock color... I know the Alpha setting, but don't know the RGB value... Is there a way to extract that RGB from a standard color?
HotShoe Well-Known Member Licensed User Longtime User Mar 30, 2014 #4 I don't know the stock constant values. They "might" be listed in a VB book or on google. I generally use the designer to tell me. I set a color, save the designer, and then close the designer. When you reopen the designer and lod that layout, the color is in rgb format. It would be nice to have a list of the color constants. --- Jem Upvote 0
I don't know the stock constant values. They "might" be listed in a VB book or on google. I generally use the designer to tell me. I set a color, save the designer, and then close the designer. When you reopen the designer and lod that layout, the color is in rgb format. It would be nice to have a list of the color constants. --- Jem
Shadow&Max Active Member Licensed User Longtime User Mar 30, 2014 #5 Thanks again Jem... The problem is that I'm letting the user select a background color from the ColorPicker dialog, and I don't know what it'll be... I've got to somehow get that value, or create a new color picker dialog of my own so I actually get the RGB values... BTW, that's no ordinary bunny! Upvote 0
Thanks again Jem... The problem is that I'm letting the user select a background color from the ColorPicker dialog, and I don't know what it'll be... I've got to somehow get that value, or create a new color picker dialog of my own so I actually get the RGB values... BTW, that's no ordinary bunny!
Shadow&Max Active Member Licensed User Longtime User Mar 30, 2014 #6 I may just be able to set it t Colors.ARGB(0,0,0,0) because if it's transparent, the color doesn't matter... Thanks again! Upvote 0
I may just be able to set it t Colors.ARGB(0,0,0,0) because if it's transparent, the color doesn't matter... Thanks again!
HotShoe Well-Known Member Licensed User Longtime User Mar 30, 2014 #7 I see. I generally just use the colordialog from the dialogs library and let the user mix their own colors. Not as easy for the user, but much easier for me since it gives the rgb values. --- Jem Upvote 0
I see. I generally just use the colordialog from the dialogs library and let the user mix their own colors. Not as easy for the user, but much easier for me since it gives the rgb values. --- Jem
Shadow&Max Active Member Licensed User Longtime User Mar 30, 2014 #8 Hi again... Well, setting it to (0,0,0,0) worked... Which dialog is that? The only one I found is: (clrP is a ColorPicker) clrP.Show("Choose Color:","OK","","Cancel",Null) I'd prefer the fullblown color dialog! Upvote 0
Hi again... Well, setting it to (0,0,0,0) worked... Which dialog is that? The only one I found is: (clrP is a ColorPicker) clrP.Show("Choose Color:","OK","","Cancel",Null) I'd prefer the fullblown color dialog!
HotShoe Well-Known Member Licensed User Longtime User Mar 30, 2014 #9 http://www.b4x.com/android/forum/threads/android-views-controls-and-dialogs.7319/#content There is a colordialog and a colorpicker in there. --- Jem Upvote 0
http://www.b4x.com/android/forum/threads/android-views-controls-and-dialogs.7319/#content There is a colordialog and a colorpicker in there. --- Jem
Shadow&Max Active Member Licensed User Longtime User Mar 30, 2014 #10 Thanks Bud... Somehow I missed that... Will play with that a bit now! Looks big though... not sure if it'll fit in landscape mode, but will try. Thanks again!!! Upvote 0
Thanks Bud... Somehow I missed that... Will play with that a bit now! Looks big though... not sure if it'll fit in landscape mode, but will try. Thanks again!!!
Shadow&Max Active Member Licensed User Longtime User Mar 30, 2014 #11 Tried it... Fine in portrait, 1 color bar cut off/missing in landscape. Maybe that's why I didn't use it at first... been working on this app for quite a while, and that was early on... I may have to make my own! Upvote 0
Tried it... Fine in portrait, 1 color bar cut off/missing in landscape. Maybe that's why I didn't use it at first... been working on this app for quite a while, and that was early on... I may have to make my own!
mangojack Expert Licensed User Longtime User Mar 30, 2014 #12 this might be of use .. RGB and hex color values .. its in Excel format. Attachments Android Color Chart.zip Android Color Chart.zip 17.2 KB · Views: 387 Upvote 0
Shadow&Max Active Member Licensed User Longtime User Mar 30, 2014 #13 Very, very helpfiul... Thanks MJ... great resource! Upvote 0