コード例 #1
0
ファイル: ViewUtils.java プロジェクト: x930073498/MultiView
 public static View getCenterItem(RecyclerView recyclerView, boolean horisontal) {
   if (horisontal) {
     return ViewUtils.getCenterXChild(recyclerView);
   } else {
     return ViewUtils.getCenterYChild(recyclerView);
   }
 }
コード例 #2
0
ファイル: ViewUtils.java プロジェクト: x930073498/MultiView
 public static int getCenterItemPosition(RecyclerView recyclerView, boolean horisontal) {
   int curPosition = -1;
   if (horisontal) {
     curPosition = ViewUtils.getCenterXChildPosition(recyclerView);
   } else {
     curPosition = ViewUtils.getCenterYChildPosition(recyclerView);
   }
   return curPosition;
 }