@Override public View getView(int position, View convertView, ViewGroup parent) { // int type = getItemViewType(position); View v = convertView; /*if (v == null) { switch (type) { case TYPE_HEADER: v = headerView; break; default:*/ v = inflater.inflate(R.layout.cell_bookmark_item, null); // v.setMinimumHeight(getPixels(110)); Log.v("position", position + ""); ItemBookmark item = items.get(position); TextView item_title = (TextView) v.findViewById(R.id.item_title); item_title.setText(item.getTitle()); TextView item_phrase = (TextView) v.findViewById(R.id.item_phrase); item_phrase.setText(item.getPhrase()); TextView item_date = (TextView) v.findViewById(R.id.item_date); // Date dte=Date.item.getId()); // long l_n_g=Long.valueOf(item.getId()); item_date.setText(Utils.getTimeDate(Long.valueOf(item.getId()), "HH:mm dd MMM yyyy")); return v; }
@Override protected String doInBackground(String... urls) { try { ArrayList<ItemBookmark> bm_list = new ArrayList<ItemBookmark>(); bm_list = dbHelper.getAllItemsBookmark(); for (ItemBookmark cur : bm_list) { if (cur.getId_book().equals(id_item)) items.add(cur); } } catch (Exception e) { } return ""; }