Comments (2)
你不能复用 iv3和iv0,每个view要单独创建一个
也就是
ImageView iv02 = new ImageView(getActivity().getApplicationContext());
iv02.setImageBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.image0));
ImageView iv0 = new ImageView(getActivity().getApplicationContext());
iv0.setImageBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.image0));
ImageView iv1 = new ImageView(getActivity().getApplicationContext());
iv1.setImageBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.image1));
ImageView iv2 = new ImageView(getActivity().getApplicationContext());
iv2.setImageBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.image2));
ImageView iv3 = new ImageView(getActivity().getApplicationContext());
iv3.setImageBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.image3));
ImageView iv32 = new ImageView(getActivity().getApplicationContext());
iv32.setImageBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.image3));
views.add(iv32);
views.add(iv0);
views.add(iv1);
views.add(iv2);
views.add(iv3);
views.add(iv02);
from cycleviewpager.
一个view只能有一个parent,所以复用的前提是两个view不能挨着,挨着的话切换的时候会有问题
from cycleviewpager.
Related Issues (6)
- v4包的Fragment中无法使用 HOT 1
- 请问你这个轮播为啥要支持4.0以上才行呢? HOT 1
- 导入报错 HOT 1
- 请问支持Fragment作为ViewPager的child吗? HOT 1
- 图片滑动效果不连贯 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cycleviewpager.