SimpleCursorAdapter(this,R.layout.text,cursor,s, new int[]{R.id.textView},0) The last parameter is responsible for what is written "int flags". Flag for what?
SimpleCursorAdapter(this,R.layout.text,cursor,s, new int[]{R.id.textView},0) The last parameter is responsible for what is written "int flags". Flag for what?
These are the auto-update flags and set the listener to change data.
FLAG_AUTO_REQUERY - when changing the cursor, the list is updated automatically, deprecated with API 11 is declared. The real value of the constant = 1
FLAG_REGISTER_CONTENT_OBSERVER - sets the listener to change the data in the cursor. If the cursor is changed, the onContentChanged() callback will work. Real constant value = 2
Source: https://ru.stackoverflow.com/questions/626292/
All Articles