android - How to find the middle index of Horizontal Listview(Recycler View) -


i have horizontal listview in want find every time middle index of screen can change size. want fisheye effect on middle index of listview every time while swiping , stopping. kindly give me suggestion.

    @override public void onbindviewholder(viewholder holder, final int position) {      try {         holder.image.setimagedrawable(cntx.getpackagemanager().getapplicationicon(apps.get(position).getappname()));         log.e("tag", "position: "+position );            if(position%4==0) {                holder.image.setminimumheight(250);                holder.image.setminimumwidth(250);            }          holder.image.setonclicklistener(new view.onclicklistener() {             @override             public void onclick(view v) {                 packagemanager pm = cntx.getpackagemanager();                 intent launchintent = pm.getlaunchintentforpackage(apps.get(position).getappname());                 cntx.startactivity(launchintent);             }         });      } catch (exception e) {         e.printstacktrace();     } } 

this want

the listview has getfirstvisibleposition() , getlastvisibleposition() methods. can add these values , divide 2. result index of middle element.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -