AssetListAdapter<asset> adapter = new AssetListAdapter<asset>(this, (ArrayList<asset>) queryResults);
listView.setAdapter(adapter);</asset></asset></asset>
private ArrayList<asset> list;
public AssetListAdapter(Context Context, ArrayList<asset> data){
list = data;
LInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
...
@Override
public Asset getItem(int i) {
return list.get(i);
}
@Override
public View getView(int i, View convertView, ViewGroup parent) {
...
Asset item = getItem(i);
//and this item can not do anything, although the item.getClass() shows Asset
}</asset></asset>
Find more questions by tags AndroidAndroid Studio