android - how to add view to random position so that i can swipe to left and right direction of View Pager? -


my scenario is, have list view many data . , when user click on it. navigate detail page view pager implemented.when user click on 10th item of list view navigate detail page problem "i unable swipe left though have 9 item previously???"

if (collection != null) {         view = (mycustomscrollview) ((activity) ctx).getlayoutinflater()                 .inflate(layoutid, null);         ((viewgroup) collection).addview(view,0);         holder = new viewholder(collection);         collection.settag(holder);      } 

here view added 0th position. how can add view selected position??? note :when replace 0 selected position of listview. compiler throws java.lang.indexoutofboundsexception: index=2 count=0 ???


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -