Exemplo n.º 1
0
 /**
  * Find the position of the first visible item of the section.
  *
  * @param sectionFirstPosition First position of section being queried.
  * @return Position of first visible item.
  */
 public int findLastVisibleItemPosition(int sectionFirstPosition) {
   View item = getLastVisibleView(sectionFirstPosition);
   if (item == null) {
     return LayoutManager.INVALID_POSITON;
   }
   return mLayoutManager.getPosition(item);
 }
Exemplo n.º 2
0
 /**
  * Find the position of the first completely visible item of this section.
  *
  * @param sectionFirstPosition First position of section being queried.
  * @return Position of first completely visible item.
  */
 public int findFirstCompletelyVisibleItemPosition(int sectionFirstPosition) {
   View item = getFirstCompletelyVisibleView(sectionFirstPosition, false);
   if (item == null) {
     return LayoutManager.INVALID_POSITON;
   }
   return mLayoutManager.getPosition(item);
 }