QuickReturnHeaderListFragment have a issues
ayyb1988 opened this issue · comments
yabin 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;
Etienne Lawlor commented
Hey @ayyb1988, can you be more specific? What issues are you experiencing?
yabin commented
my means is for listview girdview 。the first item is coverd.
Vladislav Matviienko commented
@ayyb1988 you should have read previous issue before creating a duplicate. It's 100% same as yourth.
yabin commented
@metalurgus I'am so sorry. thx . have fix.