コード例 #1
0
 public void setAreHeadersSticky(boolean areHeadersSticky) {
   mAreHeadersSticky = areHeadersSticky;
   if (!areHeadersSticky) {
     clearHeader();
   } else {
     updateOrClearHeader(mList.getFixedFirstVisibleItem());
   }
   // invalidating the list will trigger dispatchDraw()
   mList.invalidate();
 }
コード例 #2
0
 /** @param stickyHeaderTopOffset The offset of the sticky header fom the top of the view */
 public void setStickyHeaderTopOffset(int stickyHeaderTopOffset) {
   mStickyHeaderTopOffset = stickyHeaderTopOffset;
   updateOrClearHeader(mList.getFixedFirstVisibleItem());
 }