我试图将多个膨胀ViewPagers到ScrollView每个ViewPager使用FragmentStatePagerAdapter的地方.
将ViewPager有三个组成片段的ImageViews每一页.
我使用UniversalImageLoader进行图像的异步加载,但我无法获得延迟加载.
问题是,当我的应用程序正在膨胀时,让每个人说10 ViewPagers个ImageViews,每个3 个TripplePosterFragment1,另外10个ViewPagers用3个ImageViews,TripplePosterFragment2因为mPager.setOffscreenPageLimit(1)踢了.
在我看来,总共有60个异步请求被触发progressLayout.
我MainFragment用以下方法:
private void renderSubCarousels(ArrayList<Carousel> carousels) {
LayoutInflater mInflater = (LayoutInflater)getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
int i = 1;
LinearLayout subCarouselLayout = (LinearLayout) mScrollView.findViewById(R.id.index_subcategory_carousel_container);
for (final Carousel carousel : carousels) {
RelativeLayout carouselWrapper = (RelativeLayout) mInflater.inflate(R.layout.main_pager_layout, null);
LinearLayout mContainer = (LinearLayout) carouselWrapper.findViewById(R.id.main_pager_container);
mContainer.setId(Constants.BASEID_LINEARLAYOUT + i);
ViewPager mPager = (ViewPager) mContainer.findViewById(R.id.main_pager);
mPager.setId(Constants.BASEID_VIEWPAGER …Run Code Online (Sandbox Code Playgroud)