Android Question Can I do an image fade out using a seekbar?

Espinosa4

Active Member
Licensed User
Longtime User
Hi,

I was looking for info about this but everybody use time delay. My question it is posible make an image fade out using onlyh a seekbar. Alpha channel? Any easy example for a dummies?

many thanks
 

derez

Expert
Licensed User
Longtime User
You can put a panel on the image and control its color's alfa using the seekbar. when the panel is transparent you will see the image fully and when you reduce the transparency the image fades accordingly.
 
Upvote 0

Espinosa4

Active Member
Licensed User
Longtime User
Ok a bit more difficult.
I'd like to do a fade out in one picture and fade in at the same time in other picture.
Can I do this?
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Hi Espinosa,

you may use the ValueChanged event from the Seekbar object as the place where to code the "synchronous" fading of the two images.

udg
 
Upvote 0

Espinosa4

Active Member
Licensed User
Longtime User
Hi Espinosa,

you may use the ValueChanged event from the Seekbar object as the place where to code the "synchronous" fading of the two images.

udg
Hi udg, thank you very much for the reply.

Following the example that Derez commented, the panel is the basically a window where if it open we can see the picture and if it close all is black. I am a beginner programmer and it is a bit difficult for me understand some concepts. I thought I can change the alpha channel in a picture and other too. The panel in front an image is a cool but... How can I modify the alpha channel to do a fade in in a picture and a fade out in other one? I know the way is alpha channel and change value in seek bar but I don't know how I can do it :(
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Hi Espinosa,

we all were beginners at some point, so never mind.
Let me write a couple of emails and I'll post a somewhat complete example for you.
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Hi again,

please find attached a demo project showing what was discussed above.
Consider it just a starting point.

udg
 

Attachments

  • testfade.zip
    35.1 KB · Views: 270
Upvote 0

Espinosa4

Active Member
Licensed User
Longtime User
Hi again,

please find attached a demo project showing what was discussed above.
Consider it just a starting point.

udg
It works perfectly but a last question... It is possible that the imageview1 and panel1 can be on top the imageview2 and panel2. I am trying to do a face out from an image to show an actual picture and after face out how was the picture.

Sorry for my english...
I'd like to do a face out from image1 showing little by little the image2 until 100%
 

Attachments

  • 0b.jpg
    0b.jpg
    503.5 KB · Views: 216
  • 0a.jpg
    0a.jpg
    414.2 KB · Views: 188
Upvote 0
Top