You are trying to update the name of the item by looking for the item using its new name which is not set yet (in the where clause). So the update has no effect because no item matches the where clause. Use the row id instead to identify the item.
Also:
- You should pass all the string arguments of a where clause in the
whereArgs
array as last parameter instead ofnull
, so that the string will be escaped properly to avoid SQL injection problems. In the where clause string, replace the arguments with a question mark: '?'. - You should not update a database on the UI thread because it is an expensive operation, but do it in an
AsyncTask
instead.