0

シンプルなカーソルアダプターを使用してデータベースで埋められた2つのテキストビューを含むリストビューがあります。データベースからの対応する画像を使用して、リスト内の各項目内に画像を追加したいと考えています。このトピックについて検索しましたが、まだ解決策を見つけていません。どんな助けでも大歓迎です

String[] from = new String[]{InventoryDbAdapter.KEY_TITLE, InventoryDbAdapter.KEY_DESCRIPTION};

    // and an array of the fields we want to bind those fields to (in this case just text1)
    int[] to = new int[]{R.id.text1,R.id.text2};

    // Now create a simple cursor adapter and set it to display
    SimpleCursorAdapter inventory = 
        new SimpleCursorAdapter(this, R.layout.row, InventoryCursor, from, to);
    setListAdapter(inventory

ありがとう

4

1 に答える 1

0

本当に?Google で簡単に検索したところ、このブログ エントリが見つかりました。これは、Android アプリケーションで使用したものと同じだと思います。

于 2011-03-13T04:39:09.997 に答える