# Lab 1: Create the User Profile UX ## Concepts: - Create your first Android app - Create basic UX with form data - Get introduced to capturing images with the camera See mock-up designs in UserProfile.png (regular assignment) and UserProfile-extras.png (for extra credit). These mock-ups were created in a tool called Balsamiq, which product managers in Android programming shops use to pose tasks (tickets) for their developers and to communicate with clients when working out product requirements. The extra credit uses a "tooltip" dialog shape that is not yet a part of the standart Android SDK, but has been introduced by Twitter for its app; 3rd-party open-source approaches to recreating it are discussed in https://stackoverflow.com/questions/21031488/android-popupwindow-with-tooltip-arrow You will use a 3rd-party library in the regular part of this assignment to implement cropping an image taken by the camera. See third-party-cropping-library.pdf for instructions. Note that calling up the front camera specifically is hard; Android leaves the user the choice of which camera to use when the camera app receives an Intent to start its image-capturing activity. There is no network communication part in this assignment, but you will create the UI elements for it, to implement them in later assignments. For now, leave these elements inactive. ## Terms and conditions: This assignment will be due in a week. Late assignments will get 10% credit docked for each day they are late. However, you will receive three (3) free 24-hour late submission passes for this course. Use them wisely. As usual, we will waive late penalties for extenuating circumstances such as travel and sickness (ask if in doubt). Extra credit will count for 20% of extra points. ## User Stories: 1. A user opening the app on first launch results in going to the create account UI. 2. A user is presented with a form as shown in the mockup for account info entry. Several parts of this form will be left for later homeworks; in particular, do not implement the action bar. See below for other form elements to be placed but not yet implemented. 3. A user must type in a character name, full name, and passwords. 4. A user may optionally set a profile picture. 5. A user setting a profile picture is given a camera interface that can take a picture to use as the profile picture. (Extra credit for specifically open the front camera) 6. After a user enters their password once, a popup appears to ask them to reconfirm it. - The password reconfirm prompt displays a "matches" indication when the two passwords entered match. - A user may close the box if they don't match to renter the first one again. - A user may not click save until they match. 7. When a user click the save button, all the inputs should be validated. A user failing to enter information as required will be presented with an informative error message about what was entered wrong. 8. The user has the option of clicking "I already have an account". - This view will be implemented by a later ticket and is not required in this assignment. - For now, this button may be disabled. 9. Once the user starts entering data, the "I already have an account" changes to a "Clear" button that allows them to reset all entered data to the default. 10. The user profile is saved locally after the user click the save button. When the user open the app again, all the information should be retained. ## Sample Apps You can look at some of the sample apps posted here- http://www.cs.dartmouth.edu/~sergey/cs65/examples/ - Take a look at the SimpleCam and Dialog apps for better understanding. - You can find another version of the camera app here- https://github.com/mishravarun/CS65-Samples/tree/master/Camera