简体   繁体   中英

Android: ListFragment, how to show only one list item on whole screen

how can I set ListFragment to show each of its items on whole screen? And of course, when you swipe up and down, whole item should be available at a time, the list shouldn't stop scrolling in the middle of two items. Thanks for any suggestions.

You have two choices:

  1. Add a OnScorllListener and implement logic to "settle" the list after a scroll.
  2. Make a vertical ViewPager. You could copy the source code and flip everything from using X to using Y.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM