lawloretienne / QuickReturn

Showcases QuickReturn UI Pattern as either a header, footer, or both header and footer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QuickReturnHeaderListFragment have a issues

ayyb1988 opened this issue · comments

commented

header 覆盖住了上面的部分listview。我通过contentview getView 设置,但是无效,代码如下。

private static final int TYPE_HEADER = 0;
private static final int TYPE_ITEM = 1;

@OverRide
public int getItemViewType(int position) {
if (isPositionHeader(position))
return TYPE_HEADER;

    return TYPE_ITEM;
}

private boolean isPositionHeader(int position) {
    return position == 0;
}

@Override
public NewsDataItem getItem(int position) {
    return (NewsDataItem) mItemList.get(position - 1);
}

@Override
public int getCount() {
    return mItemList.size() + 1;
}

@Override
public View getView(int position, View convertView, ViewGroup parent) {
    final ItemViewHolder itemviewHolder;

    if (TYPE_ITEM == getItemViewType(position))

convertView = null;

Hey @ayyb1988, can you be more specific? What issues are you experiencing?

commented

my means is for listview girdview 。the first item is coverd.

@ayyb1988 you should have read previous issue before creating a duplicate. It's 100% same as yourth.

commented

@metalurgus I'am so sorry. thx . have fix.