public View getView(int position, View convertView, ViewGroup parent) { if (convertView == null) convertView = inflater.inflate(R.layout.item_nowplaying_track, parent, false); try { // otherwise show normal search result Response resp = (Response) this.getItem(position); String title = resp.getString("minm"); String artist = resp.getString("asar"); date.setTime(resp.getNumberLong("astm")); String length = format.format(date); ((TextView) convertView.findViewById(android.R.id.text1)).setText(title); ((TextView) convertView.findViewById(android.R.id.text2)).setText(length); ((TextView) convertView.findViewById(R.id.artist)).setText(artist); } catch (Exception e) { Log.d(TAG, String.format("onCreate Error: %s", e.getMessage())); } /* mlit --+ mikd 1 02 == 2 asal 12 Dance or Die asar 14 Family Force 5 astm 4 0003d5d6 == 251350 astn 2 0001 miid 4 0000005b == 91 minm 12 dance or die */ return convertView; }
public void foundTag(String tag, Response resp) { // add a found search result to our list if (resp.containsKey("minm")) results.add(resp); this.searchDone(); }