title: Gallery like view with center image zoom
body: <p>Here I need a gallery like view  with only three images to be shown at a time on screen. In this the middle image will be larger than the two other images on its sides.</p>
  <p>If the user scrolls the view next images will slide on screen as it does in gallery and at a time only three images will be shown out of which the center image should automatically zoom when it is shown on screen and remaining two should be smaller than it.</p>
  <p>Here I can't use gallery because it is depreciated in android.</p>
  <p>I was able to make a gallery like view with help of viewpager using code on <a href="https://gist.github.com/devunwired/8cbe094bb7a783e37ad1" rel="nofollow noreferrer">this link</a>. It shows only three images on screen at a time, which fits my one requirement. But i am not able to get the central image that is visible on screen and zoom it. Although I was able to get the clicked image on screen.</p>
  <p>Can someone please tell me where do I need to modify <a href="https://gist.github.com/devunwired/8cbe094bb7a783e37ad1" rel="nofollow noreferrer">this</a> code and what I need to add in it to get the image that is in center from the images shown on screen and zoom it.</p>
  <p><em>I know that there is no center image on screen according to viewpager and it is just showing three images on screen at a time because of modifications in code.</em></p>
  <p>I have also tried:-</p>
  <ul>
  <li>GridView with horizontal scroll</li>
  <li>HorizontalScrollView with horizontal linear layout</li>
  </ul>
  <p>but viewpager seems to be a better solution, because it stops the scrolling with only three items on screen because of viewpager's inherent properties.</p>
  <p>and If someone knows any other method to achieve it, please tell me and I'll try it.</p>
  <p><strong>P.S.</strong> For anyone who wants the full code, I have added it as an answer, which has zoom capability also. <em>Just few additions in accepted answer.</em> :)</p>