Choosing your capture device using an OptionDialog modal
OptionDialog
is a modal-only component that allows you to show one or more options to a user, usually along with a Cancel option, which closes the dialog. We are going to create this component and use it to present the user with the option of choosing an image from the camera or the device's photo library.
If you are intending to follow the entire chapter and build the Holiday Memories app, then pay careful attention to the Getting Ready section for this recipe, as it will guide you through setting up the project.
Getting ready
To prepare for this recipe, open Appcelerator Studio and log in if you have not already done so. If you need to register a new account, you can do it for free directly from within the application. Once you are logged in, click on New Project, and the details window for creating a new project will appear. Enter Holiday Memories as the name of the app, and fill in the rest of the details with your own information...