Android Question Display half part of image in imageview

Discussion in 'Android Questions' started by asales, Feb 14, 2015.

  1. asales

    asales Well-Known Member Licensed User

    I have a image with 600x450 pixels and I want to display only 300x450 (right or left) of this image in a imageview.

    If I click in button1 it shows 300x450 (left part) of image; if I click in button2 it shows 300x450 (right part) of image.

    How can I do this (directly, without crop and save the image)?

    Thanks in advance for any tip.
     
  2. sorex

    sorex Expert Licensed User

    put the image in a panel that has the size of 300x450 and then change the .left value of the inner image to either 0 or 350
     
    asales likes this.
  3. sorex

    sorex Expert Licensed User

    correction...

    it should be 0 or -350, otherwise you push it to the right and it becomes invisible.
     
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