CursorAdapter notifyDataSetChanged doesn't work? What am I doing wrong?

by Moto » Fri, 02 Jul 2010 10:41:14 GMT


Sponsored Links
 Hi I'm trying to clean up some code and now I'm determined to get this
seemless ListView updating working...

I want my ListView to be updated when I call notifyDataSetChanged()
but nothing happens... I'm also passing the autoRequery flag to true
when creating my CursorAdapter.

Cursor c = FavoritesHandler.getCategoryFavorites(getSQLiteInstance(),
category);
                m_favoriteAdapter.changeCursor(c);
                startManagingCursor(c);

Any help is greatly appreciated!
-Moto

--



Other Threads

1. Application Crashing OutOfMemory .Restructuring Help Needed

> It takes 10 mb for the UI (I have a single Activity ,but many layout
files)

That sounds wrong to me. Unless you have a really, really complex UI.

logical representation  on UI (As well as database)and it takes 6 mb of the
memory

If you have a local database you should be able to engineer your app to
fetch data using queries as required for display, rather than
loading monolithic arrays.

the server and keep it in memory as well as database and another App will be
used for showing the UI and it will do an inter Application communication to
fetch the data and display it on the UI in this App.

Whether or not this is possible, this sounds awful from a user-experience
point of view.

I'd rethink your design. In my view, given the scale constraints imposed by
an Android device (screen, input, memory) 16MB ought to be enough for
anybody.

Jim




> 

2. Disable all input on ListView

I have a layout that looks like this

LinearLayout
        ImageView
        FrameLayout
                LinearLayout
                        TextView
                        ListView
                LinearLayout
                        AutoCompleteTextView
                        AutoCompleteTextView

When i press the image view i toggle the visibility of the last
LinearLayout holding the AutoCompleteTextViews.
I wonder if there is a solution to this problem.

When the LinearLayout holding the AutoCompleteTextViews gets visible
and drawn over the list I can still scroll the listview, click the
items in it and scroll up/down on the scroll wheel on the nexus one
makes the component selection behave strange.

I can solve some of the issues by setting setFocusable(false) and
setting the setOnItemClickListener(null) on the listView. But the user
can still scroll the "background panel" which is the list view. Please
help me out

-- 

3. google nexus one how to buy one?

4. The "life cycle of a static"

5. Out of Memory resuming application

6. copy protection data loss?

7. How does a singleton behave in different processes