Do you ever wonder how list of all countries and cities looks like? Or maybe you wish wikipedia was only for such purpose?
I have something for you, weirdo
created for educational purpose
git clone https://github.com/goldenpears/wmappy.git
- import
wmappy/wmappy
folder via Android Studio (yes, second one) - run on the emulator or your device in the debug mode
or download .apk
from latest release
or get it at PlayStore and become Alpha tester!
-
Download a list of countries and cities from there - Parse that list into a local database
(for now it parses and shows straight into recycle view, right after request via HTTP) -
Create a country selector (dropdown or picker)which is populated from the local database. -
Show a list of cities of the selected country. -
Upon selecting a city from the list, fetch info about it and display it on a separate screen. For fetching city info use Wikipedia search service
Picasso - for load image of City
at WikiActivity
.
Why: unfortunately, at native methods, it would be much junky, so we just use single line of code for single and simple purpose for keep things clean and readable.
splash screen
⭐️
list of countries
⭐️
dialog with cities
⭐️
info about city and photo if exist
⭐️
Example of implementing:
- parsing
JSON
viaHTTP
- showing result as
recycle view
- displaying
dialog
usingArrayList
- and
explicit intent
toActivity
with, again, parsedJSON
- load image if exist, at
WikiActivity
viaPicasso