This is just a case of preference, but you could reduce the last 7 lines of code to 1 using `item.setTitle(showDetails ? R.string.hide_details : R.string.show_details);` and wouldn't have to allocate a `String` object.