There is a constructor for the CursorAdapter
which has an interesting flag - autoRequery
.
It is stated:
If true the adapter will call requery() on the cursor whenever it changes so the most recent data is always displayed. Using true here is discouraged.
What's the point to create the feature which is discouraged?
As per the Docs it is discouraged because it results in Cursor
operations to be performed on the application's UI thread
Because of this it causes Performance Issue for the App
Well To add more ...Other Solution for This is Using swapCursor()
Solution:
CursorDemo cursorDemo = new CursorDemo(PrintContent.this, cursor);
cursorDemo.swapCursor(cursor_update);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With