@Override public View getView(int position, View convertView, ViewGroup parent) { View itemView; ExplorerItem item = getItem(position); if (item instanceof HeaderItem) { itemView = View.inflate(context, R.layout.picker_item_header, null); itemView.setTag("header"); item.bindData(itemView); return itemView; } else { if (convertView != null && !convertView.getTag().equals("header")) return super.getView(position, convertView, parent); else return super.getView(position, null, parent); } }
@Override protected int compareFiles(ExplorerItem explorerItem, ExplorerItem explorerItem2) { return (explorerItem2.getLastModified().compareTo(explorerItem.getLastModified())); }