B Bill Norris Active Member Licensed User Longtime User Mar 9, 2012 #1 I wish to have a label and its text be invisible, then use animatealpha to make it fade in and stay visible in response to a particular event. The particular event is not relevant here, just the steps for the fade in. If I set the aspha to 0 in designer, the text of the label is still visible when the activity loads. I want the text to be invisible as well until the animation make it appear. Last edited: Mar 9, 2012
I wish to have a label and its text be invisible, then use animatealpha to make it fade in and stay visible in response to a particular event. The particular event is not relevant here, just the steps for the fade in. If I set the aspha to 0 in designer, the text of the label is still visible when the activity loads. I want the text to be invisible as well until the animation make it appear.
NJDude Expert Licensed User Longtime User Mar 9, 2012 #2 Take a look at the attached sample project. Attachments FadeSample.zip FadeSample.zip 45.9 KB · Views: 374 Last edited: Mar 9, 2012 Upvote 0
nfordbscndrd Well-Known Member Licensed User Longtime User Mar 9, 2012 #3 NJDude said: Take a look at the attached sample project. Click to expand... When I try to compile your app, I get this: AndroidManifest.xml:10: error: No resource identifier found for attribute 'hardwareAccelerated' in package 'android' Upvote 0
NJDude said: Take a look at the attached sample project. Click to expand... When I try to compile your app, I get this: AndroidManifest.xml:10: error: No resource identifier found for attribute 'hardwareAccelerated' in package 'android'
NJDude Expert Licensed User Longtime User Mar 9, 2012 #4 nfordbscndrd said: When I try to compile your app, I get this: AndroidManifest.xml:10: error: No resource identifier found for attribute 'hardwareAccelerated' in package 'android' Click to expand... Maybe you're using an older SDK, ok, I've fixed that. Upvote 0
nfordbscndrd said: When I try to compile your app, I get this: AndroidManifest.xml:10: error: No resource identifier found for attribute 'hardwareAccelerated' in package 'android' Click to expand... Maybe you're using an older SDK, ok, I've fixed that.
nfordbscndrd Well-Known Member Licensed User Longtime User Mar 9, 2012 #5 NJDude said: Take a look at the attached sample project. Click to expand... I looked at your code in a text editor (since I couldn't load it into B4A) and saw the line: Label1.TextColor = Colors.ARGB(AlphaValue, 255, 255, AlphaValue) Did you intend to put the AlphaValue at the end? (That changes the font color as it's fading in/out, which maybe you intended as a "feature"?) Upvote 0
NJDude said: Take a look at the attached sample project. Click to expand... I looked at your code in a text editor (since I couldn't load it into B4A) and saw the line: Label1.TextColor = Colors.ARGB(AlphaValue, 255, 255, AlphaValue) Did you intend to put the AlphaValue at the end? (That changes the font color as it's fading in/out, which maybe you intended as a "feature"?)
NJDude Expert Licensed User Longtime User Mar 9, 2012 #6 Yes, it fades the text as the OP requested. Upvote 0
nfordbscndrd Well-Known Member Licensed User Longtime User Mar 9, 2012 #7 NJDude said: Yes, it fades the text as the OP requested. Click to expand... The first "AlphaValue" (in the Alpha spot) fades the text. The second one is changing the color, isn't it? You have: Colors.ARGB(AlphaValue, 255, 255, AlphaValue) And the format for ARGB is Colors.ARGB(Alpha As Int, R As Int, G As Int, B As Int) I think that the 2nd AlphaValue should just be 255 (or whatever color is wanted) Last edited: Mar 9, 2012 Upvote 0
NJDude said: Yes, it fades the text as the OP requested. Click to expand... The first "AlphaValue" (in the Alpha spot) fades the text. The second one is changing the color, isn't it? You have: Colors.ARGB(AlphaValue, 255, 255, AlphaValue) And the format for ARGB is Colors.ARGB(Alpha As Int, R As Int, G As Int, B As Int) I think that the 2nd AlphaValue should just be 255 (or whatever color is wanted)
NJDude Expert Licensed User Longtime User Mar 9, 2012 #8 This is the APK of the attached sample in case you want to take a look. Yes, I see what you mean, I think I typed too fast. Last edited: Mar 9, 2012 Upvote 0
This is the APK of the attached sample in case you want to take a look. Yes, I see what you mean, I think I typed too fast.
nfordbscndrd Well-Known Member Licensed User Longtime User Mar 9, 2012 #9 NJDude said: This is the APK of the attached sample in case you want to take a look. Yes, I see what you mean, I think I typed too fast. Click to expand... But you are still the man, Dude! Upvote 0
NJDude said: This is the APK of the attached sample in case you want to take a look. Yes, I see what you mean, I think I typed too fast. Click to expand... But you are still the man, Dude!
NJDude Expert Licensed User Longtime User Mar 9, 2012 #10 Thanks And thank you for pointing out my mistake. Upvote 0