[Android] Do not add/remove lists twice
Geoffrey Métais
git at videolan.org
Wed Dec 14 16:49:58 CET 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Dec 14 16:27:20 2016 +0100| [931a583d864f6121fe97048b90d17983ecbb5a48] | committer: Geoffrey Métais
Do not add/remove lists twice
> https://code.videolan.org/videolan/vlc-android/commit/931a583d864f6121fe97048b90d17983ecbb5a48
---
vlc-android/src/org/videolan/vlc/gui/audio/AudioPagerAdapter.java | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPagerAdapter.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPagerAdapter.java
index f4709cb..c8bd72c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPagerAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPagerAdapter.java
@@ -51,14 +51,11 @@ public class AudioPagerAdapter extends PagerAdapter {
@Override
public Object instantiateItem(ViewGroup container, int position) {
- View page = mLists.get(position);
- container.addView(page);
- return page;
+ return mLists.get(position);
}
@Override
public void destroyItem(ViewGroup container, int position, Object object) {
- container.removeView((View) object);
mLists.remove(position);
}
More information about the Android
mailing list