Android Question Extract image of a panel

Discussion in 'Android Questions' started by vecino, Feb 26, 2015.

  1. vecino

    vecino Well-Known Member Licensed User

    Hello, how I can extract the image of a panel?
    Regards.

    img.png
     
  2. DonManfred

    DonManfred Expert Licensed User

    You dont to extract. it is the file generic.png in your assets-folder.
    In fact i dont know how to do, sorry.
     
    vecino likes this.
  3. thedesolatesoul

    thedesolatesoul Expert Licensed User

    You can get it as a drawable using Panel.Background.
     
    NJDude and vecino like this.
  4. klaus

    klaus Expert Licensed User

    What exactly do you want to do ?
     
  5. vecino

    vecino Well-Known Member Licensed User

    Thank you very much :)
     
  6. vecino

    vecino Well-Known Member Licensed User

    I want to get the color of an area of the screen.
    It can be a panel with an image or imageview.
    Example:
    example.png
     
  7. KZero

    KZero Active Member Licensed User

    put the image in imageview
    the put this imageview on panel (to catch touch event)
    on panel_touch event try this code

    Code:
    Dim b As Bitmap
         b=imageview1.bitmap
        
    Activity.Color=b.getpixel(X,Y)
    i didn't try it but i think it should work
     
    Last edited: Feb 26, 2015
    vecino and DonManfred like this.
  8. vecino

    vecino Well-Known Member Licensed User

    Thanks, I'll try.
     
  9. vecino

    vecino Well-Known Member Licensed User

    Each "touch" on the screen, repeat the event several times. 3 times in this example.
    Why can it be?
    Thank You

    serepite.png
     
  10. DonManfred

    DonManfred Expert Licensed User

    Check the Action of the events... A touch always gives more than one events. Touch down, touch up and so on
     
    KZero, thedesolatesoul and vecino like this.
  11. RandomCoder

    RandomCoder Well-Known Member Licensed User

    Like Manfred has suggested, just use a conditional statement in the event to only check on the touch_down event or the touch_up.
     
    vecino likes this.
  12. vecino

    vecino Well-Known Member Licensed User

    Oh!, Thanks, folks, this is easy when you know :D
     
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