简体   繁体   English

ViewPager中的图库视图

[英]Gallery view inside ViewPager

I implemented a ViewPager inside my app (according to this recent blog entry: http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html ). 我在应用程序内部实现了ViewPager(根据最近的博客文章: http : //android-developers.blogspot.com/2011/08/horizo​​ntal-view-swiping-with-viewpager.html )。

One of my views inside my ViewPager is a ListView with a gallery as its header view. 我的ViewPager中的一个视图是一个ListView,其中有一个画廊作为其标题视图。 (Looks pretty much like the early version of the Android market back in 2008). (看起来很像2008年的Android市场的早期版本)。 However, the gallery is not scrollable now. 但是,图库现在无法滚动。 Instead of wiping through the images in my gallery I'm scrolling through the different views inside the ViewPager. 我不是在浏览图库中的图像,而是在ViewPager中滚动浏览不同的视图。

I need a workaround to fix this. 我需要一种解决方法来解决此问题。 Any hints? 任何提示?

Thanks in advance 提前致谢

So... just to get this right... you are saying you are putting a gallery view inside of a list view inside of a view pager. 所以...只是为了解决这个问题...您是说要在视图分页器的列表视图中放置图库视图。

Is that right? 那正确吗?

Seriously, um, don't do that. 严重的,嗯,不要那样做。 :} :}

Anyway the problem you have is that the ViewPager watches for vertical movements to swipe between the pages. 无论如何,您遇到的问题是ViewPager监视在页面之间滑动的垂直移动。 It is taking the vertical movements, so you can't do vertical movements in the gallery to swipe in it. 它正在进行垂直移动,因此您无法在图库中进行垂直移动以在其中滑动。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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