Also forceably hid the "update all" button in the update tab.
This is because on my crapy LG Tracphone android-10 device, it is slow
enough that I can see that button appear and then disappear.
Also changed the way locales are loaded. Now it deals well with language
codes that are followed by country codes (e.g. "en-US" rather than just
"en").
Change client language from the app options (#155)
Bug: ActionBar Language does not change.
Edit: To make it more clear, you have to restart the app manually for the action bar language to be changed.
See merge request !65
It does this by sending a HTTP POST request to /request-swap on the
swap server. That listens for a POST to this path, and responds by
popping open a confirmation message to the user on the server device.
The categories were previously selected in the Spinner, then passed
directly to the database. Once the categories became translated, this
meant we were sending the translated category to the database.
However, the database only knows about English categories, and so we
instead need to look up the English translation for the selected
category before passing to the database. This is done by keeping
a list of original category names which is indexed the same as the
translated ones.
Previously, there was a bug with an off-by-one error, as android-11
or later was treating the headerView different to android-10 and
earlier. They now both have the same understanding about the header
view.
For some reasono specify different layout-v* directories to inflate
views based on the android version is not working as desired.
Previously there was a "layout", "layout-land" and "layout-v11" dir.
Only "layout" and "layout-v11" had the "select_local_apps_list_item.xml"
layout in them, the "layout-v11" version did _not_ have a checkbox,
whereas the other vanilla one did.
This worked on a android-16 emulator. It would correctly pick up the
view from "layout-v11". However, on a android-19 device, android-19
emulator, android-21 device and android-21 emulator, they all picked
up the view from the "layout" dir - with checkbox and all.
I couldn't figure out for the life of my why this was happening, so
I started to figure out which one it _would_ work with. I added
a layout-v* for every single version, and in each, put a text view
telling me which version it was. That way, viewing the list of apps to
swap, the list would inflate a view, and tell me which layout-v* dir it
inflated it from. It worked for layout-v17 and higher, but was unable
to inflate layouts from layout-v11 to layout-v16. So I deleted all
except layout-v17, and it now works for android-16, 19 and 21 as per my
tests.
Now that we controll all lib build.gradle files, we can finally do it.
If we want to build support-v7 from source again with gradle, we'll import the
build.gradle and "fix" it like the rest.