Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="https://gist.github.com/8cbe094bb7a783e37ad1" rel="noreferrer">This gist from Dave Smith</a> shows a way to use <code>ViewPager</code> to have visual results very similar to a <code>Gallery</code>:</p> <p><img src="https://i.stack.imgur.com/Cw2oP.png" alt="Gallery-style ViewPager"></p> <p>Quoting <a href="http://commonsware.com/blog/2012/08/20/multiple-view-viewpager-options.html" rel="noreferrer">my blog post on the topic</a> of showing multiple pages at a time in a <code>ViewPager</code>:</p> <blockquote> <p>His container (<code>com.example.pagercontainer.PagerContainer</code>) wraps the <code>ViewPager</code> and calls <code>setClipChildren(false);</code> on itself, so even though the <code>ViewPager</code> is focused on one selected page, other pages that have coordinates beyond the <code>ViewPager</code> bounds are still visible, so long as they fit within the <code>PagerContainer</code>. By sizing the <code>ViewPager</code> to be smaller than the <code>PagerContainer</code>, the <code>ViewPager</code> can size its pages to that size, leaving room for other pages to be seen. <code>PagerContainer</code>, though, needs to help out a bit with touch events, as <code>ViewPager</code> will only handle swipe events on its own visible bounds, ignoring any pages visible to the sides.</p> </blockquote> <p>You might also want to sift through <a href="https://groups.google.com/forum/?fromgroups=#!topic/android-developers/RIERxUcGpQg" rel="noreferrer">this android-developers thread</a>, where somebody pointed out an issue with this on newer Android versions. You need to disable hardware acceleration <a href="http://code.google.com/p/android/issues/detail?id=36788" rel="noreferrer">due to a bug in <code>ViewPager</code></a>.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload