TextView+Drawable複合語を?と一緒に使用することは可能SimpleCursorAdapterですか?
警告が表示されます。このタグとその子は、1つと<TextView/>複合ドローアブルに置き換えることができますが、を使用してこれを修正する方法がわかりませんSimpleCursorAdapter。
私の以前のコード:
convertView = mInflater.inflate(R.layout.list_item_group, null); ((TextView) convertView.findViewById(R.id.text)).setText(item.getName()); ((TextView) convertView.findViewById(R.id.text)).setCompoundDrawablesWithIntrinsicBounds(item.getIcon(), 0, 0, 0);私の現在のコード:
mAdapter = new SimpleCursorAdapter(getBaseContext(), R.layout.list_item_group, null, new String[] { DataBaseHelper.KEY_NAME}, new int[] { R.id.name }, 0); mListView.setAdapter(mAdapter);
ありがとうございました