Hi,
   I'm getting some very jerky scrolling while using the code below to
create a ListView from a Cursor. Is there something I'm doing wrong,
or any way to improve the performance of this ListView?

bookmarksListView = (ListView)findViewById(R.id.bookmarks_listview);
                        bookmarksDbCursor = bookmarkStore.getCursor();
                        startManagingCursor(bookmarksDbCursor);
                        String[] bookmarksColumns = new String[3];
                        bookmarksColumns[0] = "TITLE";
                        bookmarksColumns[1] = "URL";
                        bookmarksColumns[2] = "ICONID";
                        int[] bookmarksViews = new int[3];
                        bookmarksViews[0] = R.id.title_text;
                        bookmarksViews[1] = R.id.subtitle_text;
                        bookmarksViews[2] = R.id.icon_view;
                        bookmarksListAdapter = new SimpleCursorAdapter(this,
                                        R.layout.list_item,
                                        bookmarksDbCursor,
                                        bookmarksColumns,
                                        bookmarksViews);
                        bookmarksListView.setAdapter(bookmarksListAdapter);
                        bookmarksListView.setOnItemClickListener(new 
OnItemClickListener()
{
                                @Override
                                public void onItemClick(AdapterView<?> parent, 
View view,
                                                int position, long id) {
                                        
Toast.makeText(BookmarkHistoryTabActivity.this, "Clicked ID " +
Long.toString(id), Toast.LENGTH_SHORT).show();
                                }
                        });
                        registerForContextMenu(bookmarksListView);

Note: bookmarkStore.getCursor() returns an unmanaged cursor from a
sqlite database containing the columns from bookmarksColumns.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to