【问题标题】:loading images through lazylist?通过惰性列表加载图像?
【发布时间】:2013-08-06 00:09:42
【问题描述】:

我正在尝试将一些数据从我的 android 应用程序中的脱机数据库加载到 listview :) 这是问题所在: 在数据库中,我存储了 imageview 的链接。我怎么能用它来使用惰性列表?! 这是我的代码:

list.setAdapter(null);
            Cursor cursor = dbHelpersamsung.listsamsung();
            String[] columns = new String[] { LebanonSamsung.KEY_URL, LebanonSamsung.KEY_PHONENAME,
                    LebanonSamsung.KEY_PRICE, LebanonSamsung.KEY_MODELNUMBER };

            int[] to = new int[] { R.id.thephoneimage, R.id.title2, R.id.details2,
                    R.id.modelnumber2 };
            SimpleCursorAdapter dataAdapter2 = new SimpleCursorAdapter(
                    this.getSherlockActivity(), R.layout.pricelistoffline,
                    cursor, columns, to, 0);
            list.setVisibility(View.VISIBLE);
            list.setAdapter(dataAdapter2);

加载图片时如何使用惰性列表?非常感谢:D

【问题讨论】:

    标签: android database simplecursoradapter lazylist


    【解决方案1】:

    这里有一个有趣的话题可以帮助你:Lazy load of images in ListView

    祝你好运

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-10-10
    • 1970-01-01
    • 2012-04-15
    • 2011-02-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多