Closed Swati4star closed 5 years ago
Would like to work on this.
I'm finding this hard to implement. So I would prefer to work on some other issue for now.
@aayushinigam Sure. Pick up some other issue. ( But if you want to pick it up later, you can comment 👍 )
Thanks @Swati4star :) .If I figure it out, I'll work on this.
@aayushinigam You can pick this up. Don't add expandable views for now. Let it just be a single static page, with headings (in bold) and data under it
Oh okay!
@Swati4star So here's the thing. The above format is not exactly the same for all cities. In some cities, the given key exists, for some it doesn't. And hence the layout doesn't get filled. Had response been in JSONArray format , it would have been still easier to check through index. But it's a JSONObject, so keys have to be mentioned explicitly.
Here's an example -
@aayushinigam True. The keys are not the same for all cities. So, you can use this code to get a list of keys from the JSON Object : https://stackoverflow.com/questions/20419217/to-get-all-the-keys-in-jsonobject-into-string-array and then, keep on extracting values from it.
@Swati4star Any suggestions for the UI?
Ecology
, we have summary
....
at the end of each section. How can the user view the whole content?The problem right now is that we don't know what keys will have sub headings plus it will then become multi level list view. User can view whole content by clicking on text, it's an expandable text view.
oh okay. Looks good then, you can commit this.
Expected behaviour
City History
in the city info page (just below the weather card)The city history info has various levels of headings & under that subheadings (similar to wikipedia page : https://en.wikipedia.org/wiki/Delhi, checkout it's content section) [An example is given below]
On the city history activity, show the information received from the API. The headings should be bold. Make each heading an expandable view (similar to city description in city info page)
Response format
Endpoint to use
get-city-information/<city-id>