Example #1
0
 public static View getCenterItem(RecyclerView recyclerView, boolean horisontal) {
   if (horisontal) {
     return ViewUtils.getCenterXChild(recyclerView);
   } else {
     return ViewUtils.getCenterYChild(recyclerView);
   }
 }
Example #2
0
 public static int getCenterItemPosition(RecyclerView recyclerView, boolean horisontal) {
   int curPosition = -1;
   if (horisontal) {
     curPosition = ViewUtils.getCenterXChildPosition(recyclerView);
   } else {
     curPosition = ViewUtils.getCenterYChildPosition(recyclerView);
   }
   return curPosition;
 }