nicholas.jj.taylor Member Licensed User Longtime User Oct 23, 2013 #1 Back in the days of the BBC (the computer, not the broadcasting corporation ), we had colours that would blink or flash. I have a project where this feature would come in handy, and would like to know a standard way for either making a text field automatically toggle between visible or invisible, or the EditText's text colour to flash between two colours e.g 0xFFFF0000 and 0xFF880000 How should I achieve these two effects?
Back in the days of the BBC (the computer, not the broadcasting corporation ), we had colours that would blink or flash. I have a project where this feature would come in handy, and would like to know a standard way for either making a text field automatically toggle between visible or invisible, or the EditText's text colour to flash between two colours e.g 0xFFFF0000 and 0xFF880000 How should I achieve these two effects?
DonManfred Expert Licensed User Longtime User Oct 23, 2013 #2 You can use a simple timer and a global variable for that. Upvote 0
nicholas.jj.taylor Member Licensed User Longtime User Oct 23, 2013 #3 Brilliant, thanks Manfred. I didn't want to go off and play with timers if there was already a function to do it for me e.g. Code: Copy Dim IntColour1 As Int = 0xFFFF0000 Dim IntColour2 As Int = 0xFF880000 Dim IntBlinkIntervalInTicks As Int = 500 EditText.TextColour = Colours.Blink(IntColour1, IntColour2, IntBlinkIntervalInTicks) Upvote 0
Brilliant, thanks Manfred. I didn't want to go off and play with timers if there was already a function to do it for me e.g. Code: Copy Dim IntColour1 As Int = 0xFFFF0000 Dim IntColour2 As Int = 0xFF880000 Dim IntBlinkIntervalInTicks As Int = 500 EditText.TextColour = Colours.Blink(IntColour1, IntColour2, IntBlinkIntervalInTicks)
DonManfred Expert Licensed User Longtime User Oct 23, 2013 #4 Thank you for your reply. I didn´t know that there already is this .Blink(...) avaiable. Upvote 0
Informatix Expert Licensed User Longtime User Oct 23, 2013 #5 DonManfred said: Thank you for your reply. I didn´t know that there already is this .Blink(...) avaiable. Click to expand... No, this Blink function does not exist. Usually, in the Android world (and I would say in most modern apps), it's a symbol/icon that blinks, not the text beside. If you don't want to use a timer, you can use an endless animation that changes the transparency of the TextView. Upvote 0
DonManfred said: Thank you for your reply. I didn´t know that there already is this .Blink(...) avaiable. Click to expand... No, this Blink function does not exist. Usually, in the Android world (and I would say in most modern apps), it's a symbol/icon that blinks, not the text beside. If you don't want to use a timer, you can use an endless animation that changes the transparency of the TextView.
nicholas.jj.taylor Member Licensed User Longtime User Oct 23, 2013 #6 Unfortunately, I do not have the room for an additional icon. I haven't used the animation feature yet, and do not know how to do so. Do I need to enable any additional libraries? Is there a tutorial or thread that you know of to help get me started? Upvote 0
Unfortunately, I do not have the room for an additional icon. I haven't used the animation feature yet, and do not know how to do so. Do I need to enable any additional libraries? Is there a tutorial or thread that you know of to help get me started?
Informatix Expert Licensed User Longtime User Oct 23, 2013 #7 nicholas.jj.taylor said: Unfortunately, I do not have the room for an additional icon. I haven't used the animation feature yet, and do not know how to do so. Do I need to enable any additional libraries? Is there a tutorial or thread that you know of to help get me started? Click to expand... Here's a tutorial Upvote 0
nicholas.jj.taylor said: Unfortunately, I do not have the room for an additional icon. I haven't used the animation feature yet, and do not know how to do so. Do I need to enable any additional libraries? Is there a tutorial or thread that you know of to help get me started? Click to expand... Here's a tutorial