Skip to content

ausichenko/Cities

Repository files navigation

Cities

Test android app from Azoft

  • The application was written using MVVM pattern

App Task

HANDSET REQUIREMENTS

There are two parts in “Cities” application.

  1. List screen. Consists of the items of the json array available at WS (see URL below). The background of the list's host activity will be green. The list view will occupy the entire screen. Each cell will contain a white text view («name» field from JSON object) and an image view («image_url» fields from JSON object). A selected (or clicked) cell will have a white background with black text. Normal state cell will have a transparent background.
  2. Details screen. When user clicks on a cell it will launch a second screen displaying a details about city. The scroll view will contain an imageview (stretched by screen width). The textview will display the «description» field from JSON object. The image view will display the «image_url» field of the same JSON object.

Responce example

{"cities":[{"id":1,"name":"Barcelona","description":"In a privileged position on the northeastern coast of the Iberian peninsula and the shores of the Mediterranean, Barcelona is the second largest city in Spain in both size and population. It is also the capital of Catalonia, 1 of the 17 Autonomous Communities that make up Spain.\n\nThere are two official languages spoken in Barcelona: Catalan, generally spoken in all of Catalonia, and Castillian Spanish. The city of Barcelona has a population of 1.510.000, but this number spirals to more than 4.000.000 if the outlying areas are also included.\n\nThe capital of Catalonia is unequivocally a Mediterranean city, not only because of its geographic location but also and above all because of its history, tradition and cultural influences. The documented history of the city dates back to the founding of a Roman colony on its soil in the second century B.C. Modern Barcelona experienced spectacular growth and economic revival at the onset of industrialization during the second half of the 19th century. The 1888 World's Fair became a symbol of the capacity for hard work and the international outlook projected by the city. Culture and the arts flourished in Barcelona and in all of Catalonia; the splendor achieved by Catalonian modernism is one of the most patent displays.","image_url":"images/01_barcelona.jpg","country":null,"location":{"latitude":41.3887869,"longitude":2.1589851}},{"id":2,"name":"Bergen","description":"Surrounded by seven hills and seven fjords, Bergen is a beautiful, charming city. With the Unesco World Heritage–listed Bryggen and buzzing Vågen harbour as its centrepiece, Bergen climbs the hillsides with hundreds of timber-clad houses, while cable cars offer stunning views from above. Throw in great museums, friendly locals and a dynamic cultural life and Bergen amply rewards as much time as you can give it. A word of warning, however: In summer Bergen gets a little overwhelmed by visitors (with a 25% increase in visitors in the last five years) and finding accommodation can be a problem so always book ahead.","image_url":"images/02_bergen.jpg","country":null,"location":{"latitude":60.391294,"longitude":5.32205}}]}

Releases

No releases published

Packages

No packages published

Languages