Add OnDismissListener. Update SDK Version

- Add OnDismissListener for the dialog.
- Update the build tools for grade
- Update Target and Compile SDK to 21