Why would one use the AlertDialog.Builder class rather than the methods directly available to AlertDialog,
For example, why use AlertDialog.Builder.setCancellable rather than AlertDialog.setCancellable? Surely this is a case of redundancy?
Why would one use the AlertDialog.Builder class rather than the methods directly available to
Share
Because
AlertDialog.setCancellablereturns void andAlertDialog.Builder.setCancellablereturns anAlertDialog.Builder.This means that the builder allows you to chain a bunch of settings with a little less verbosity. It’s just a convenience class