public class ListViewImgAdapter extends BaseAdapter {
public static final String TAG = "ListViewImgAdapter";
private final int plastic_randomNum = 218947932;
private final int plastic_iconNum = 98367590;
int mGalleryItemBackground;
private Context mContext;
public int pageCount = Broker.model.issueFilter.issueShowingList().size();
public String[] mImageIds;
public ListViewImgAdapter(Context c) {
mContext = c;
}
public void updateListSize() {
pageCount = Broker.model.issueFilter.issueShowingList().size();
Log.d(TAG, "RefreshAll, have cells: " + pageCount);
}
public int getCount() {
return Broker.model.issueFilter.issueShowingList().size();
}
public Object getItem(int position) {
return position;
}
public long getItemId(int position) {
return position;
}
public View getView(int position, View convertView, ViewGroup parent) {
RelativeLayout container ;
// Log.d(TAG,"GetView. ConvertView "+position+" of "+ Broker.model.issueFilter.issueShowingList().size());
if (Broker.model.issueFilter.issueShowingList().size()<= position ) return null;
if (convertView == null) {
// Log.d(TAG,"GetView. ConvertView is null");
container = new RelativeLayout(mContext);
IRIssue theIssue = Broker.model.issueFilter.issueShowingList().get(position);
final int clickedPosition = position;
的第一項.............如何忽略陣列適配器
Broker.model.issueFilter.issueShowingList()得到(位置)。
我有一個isssueShowingList是一個ArrayList,問題是我該如何忽略適配器中此列表中的第一個元素?我試過返回null,但它有一些錯誤,所以有沒有更好的方法?謝謝
請格式化代碼。 –