Exemplo n.º 1
0
  @Override
  protected void onItemAddedToList(int position, boolean flow) {
    super.onItemAddedToList(position, flow);

    if (isHeaderOrFooterPosition(position) == false) {
      Column col = getNextColumn(flow, position);
      mItems.append(position, col.getIndex());
    }
  }
Exemplo n.º 2
0
  @Override
  protected void onAdjustChildViews(boolean down) {

    int firstItem = getFirstVisiblePosition();
    if (down == false && firstItem == 0) {
      final int firstColumnTop = mColumns[0].getTop();
      for (Column c : mColumns) {
        final int top = c.getTop();
        // align all column's top to 0's column.
        c.offsetTopAndBottom(firstColumnTop - top);
      }
    }
    super.onAdjustChildViews(down);
  }
Exemplo n.º 3
0
  @Override
  protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
    super.onMeasure(widthMeasureSpec, heightMeasureSpec);
    columnWidth =
        (getMeasuredWidth()
                - mListPadding.left
                - mListPadding.right
                - mColumnPaddingLeft
                - mColumnPaddingRight)
            / getColumnNumber();

    for (int index = 0; index < getColumnNumber(); ++index) {
      mColumns[index].mColumnWidth = columnWidth;
      mColumns[index].mColumnLeft = mListPadding.left + mColumnPaddingLeft + columnWidth * index;
    }

    mFixedColumn.mColumnLeft = mListPadding.left;
    mFixedColumn.mColumnWidth = getMeasuredWidth();
  }
Exemplo n.º 4
0
 @Override
 protected void onLayout(boolean changed, int l, int t, int r, int b) {
   super.onLayout(changed, l, t, r, b);
   // TODO the adapter status may be changed. what should i do here...
 }