V2 Phase Documentation - swansond/LavatoryLocator GitHub Wiki
Quick Use (on Eclipse)
NOTE: Our app will load on the emulator, but a significant part of the UI won't work. This extends beyond Google Play services; we use a library called Sherlock Action Bar that the emulator refuses to load.
- Clone our repository: git clone [email protected]:swansond/LavatoryLocator.git
- In Eclipse, navigate to File->Import...
- Navigate to Android->Existing Android Code Into Workspace, click Next
- Click Browse and select the LavatoryLocator directory (which was created during the clone)
- Five projects should show up: choose to import LavatoryLocator, actionbarsherlock, and google-play-services_lib and click Finish. The other two projects are for our testing code, which aren't needed to run the project on the emulator.
Quick Use (on Android phone)
- Download our .apk file here
- Install the .apk
- Run the app.
Localization Details
- For the most part, our code base was already set up for localization: we'd been following good Android practice and not hard-coding (too many) strings in our code, but rather referring to them in our resources directory. Thus internal changes to our code were minimal.
- We decided to localize our app to British English (or our version of it... which is the better version).
- You can see the pull request for this change here and here.
- For our non-text resource, we chose to change our lavatory image (the one on the Lavatory Detail screen). You can see the relevant pull request here.
- In order to see these changes, go to Settings->Language & Input->Language, and select English (United Kingdom).
Refactoring Details
- As we discussed earlier, we've already done some significant refactoring over the life of this project. You've already been sent one of the pull requests for that refactor.
- Some more minor changes we've done:
- Removed magic numbers from our code base: https://github.com/swansond/LavatoryLocator/pull/110
- Separated UI tests from regular tests: https://github.com/swansond/LavatoryLocator/pull/112
- Changed our lavatory types (e.g., male, female) from characters to enums, and removed a lot of duplicate code for working with lavatory types: https://github.com/swansond/LavatoryLocator/pull/108