Keep screen orientation for OI Shopping List
completed by: Gautam
mentors: Peli
The task is to add an option to OI Shopping List to keep the screen orientation while running the app. While in a shop, users want to leave their OI Shopping List application open to tick items off as they put them into their shopping cart. As they move the mobile phone, the screen orientation may change unwantedly. This new setting will allow the user to keep a predefined screen orientation, even if the device is moved. This task is based on a Uservoice feature request.
In order to implement the change, you first need to add an option to res/xml/preferences.xml to "Screen orientation". This should have three options: "Default" (i.e. use the system's automatic screen orientation, "Portrait" (force portrait mode), and "Landscape" (force landscape mode). One can set the preferred screen orientation in the manifest or in code (see stackoverflow discussion. Since the solution should depend on the preference, the screen orientation has to be set in code in ShoppingActivity using setRequestedOrientation.
Your solution should consist of a patch (instructions) based on the latest version of OI Shopping List. If you don't have it yet, you first need to download and install the Android SDK (instructions). Follow these instructions to build OI applications.
- Difficulty: easy
- Time limit: 14 days
- Prerequisites: Download the Android SDK (instructions)
- Requirements for completed entry:
- Send in a patch with your code modifications (instructions).
- The code must follow our StyleGuide.
- OI Shopping List must have an additional preference "Disable screen lock".
- This option must disable the screen lock of the application.