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

Discussion in 'Android Questions' started by Espinosa4, Jan 26, 2015.

  1. Espinosa4

    Espinosa4 Active Member Licensed 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
     
  2. derez

    derez Expert Licensed 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.
     
    Espinosa4 likes this.
  3. Espinosa4

    Espinosa4 Active Member Licensed User

    Thanks derez,

    I'll try to do this! Many many thanks for the reply!
     
  4. Espinosa4

    Espinosa4 Active Member Licensed 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?
     
  5. udg

    udg Expert Licensed 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
     
    Espinosa4 likes this.
  6. Espinosa4

    Espinosa4 Active Member Licensed User

    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 :(
     
  7. udg

    udg Expert Licensed 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.
     
    Espinosa4 likes this.
  8. Espinosa4

    Espinosa4 Active Member Licensed User

    Many many thanks udg!
     
  9. udg

    udg Expert Licensed User

    Hi again,

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

    udg
     

    Attached Files:

    Espinosa4 likes this.
  10. Espinosa4

    Espinosa4 Active Member Licensed User

    Thanksssss I'll comment the results!
    Cheers
     
  11. Espinosa4

    Espinosa4 Active Member Licensed User

    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%
     

    Attached Files:

    • 0b.jpg
      0b.jpg
      File size:
      503.5 KB
      Views:
      72
    • 0a.jpg
      0a.jpg
      File size:
      414.2 KB
      Views:
      70
  12. NJDude

    NJDude Expert Licensed User

    Take a look at THIS library.
     
    Espinosa4 likes this.
  13. Espinosa4

    Espinosa4 Active Member Licensed User

    Thank you very much indeed NJDude for your help!

    I'll see the link and I'll comment

    Cheers
     
  14. Espinosa4

    Espinosa4 Active Member Licensed User

    Thankssssss NJDude!! It works perfectly!!

    Cheers
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice