Android Onchange() Method Only Returns False
I have a ContentObserver onChange() declared as a subclasse in my activity. But it always returns false. Can anyone tell me why? (Update) This code must call the fillList if the Ca
Solution 1:
The function doesn't return false, because it doesn't return anything. Its return type is void
. It receives false as a parameter.
Why?
Well, I typed 'android onchange' into Google and selected the first result, and found the following:
This method is called when a change occurs to the cursor that is being observed.
Parameters
selfChange trueif the update was caused by a callto commit on the cursor
that is being observed.
So all that happened is that the cursor was changed, and not by calling its .commit()
method. You will only log a 'true' input to this function if .commit()
is called.
Post a Comment for "Android Onchange() Method Only Returns False"