java - circular image horizontal scrollview in android so that when i reach last image, first will come and when i reach first image, last will come -
hello using horizontal image scrolling reference of slide show demo .
now want create circular when 43rd image comes scroll not stopped should come first image.
i have added images this.
public void addimagestoview() { (int j = 0; j < utility.image_array.length; j++) { final button imagebutton = new button(this); imagebutton.setbackgroundresource(utility.image_array[j]); imagebutton.setlayoutparams(new layoutparams(layoutparams.wrap_content, layoutparams.wrap_content)); system.gc(); runtime.getruntime().gc(); imagebutton.settag(i); imagebutton.setonclicklistener(new onclicklistener() { @override public void onclick(view arg0) { if (isfacedown) { /* * if (clicktimer != null) { clicktimer.cancel(); * clicktimer = null; } clickedbutton = (button) arg0; * stopautoscrolling(); * clickedbutton.startanimation(scalefaceupanimation()); * clickedbutton.setselected(true); clicktimer = new * timer(); * * if (clickschedule != null) { clickschedule.cancel(); * clickschedule = null; } clickschedule = new * timertask() { public void run() { * startautoscrolling(); } }; * clicktimer.schedule(clickschedule, 1500); */ } } }); linearlayout.layoutparams params = new linearlayout.layoutparams( 256, 256); params.setmargins(0, 25, 0, 25); imagebutton.setlayoutparams(params); horizontalouterlayout.addview(imagebutton); } }
i want know how can create 43 images circular smoothly when scroll right , reach lastly image should scroll right 1st image , on. same left scrolling.
this infinitescrollview may help or give thought scrolling , circular scrolling https://github.com/satansly/infinitescrollview
i hope help you.
java android horizontalscrollview circular-list
No comments:
Post a Comment