First Time with Android
Its GoJek’s Android bootcamp for a week and we have to make a movies app in it. Android has always fascinated me but I couldn’t get a good starting point unlike many frameworks.
Basics
Android is an operating system for mobiles built over linux primarily for the touch screen devices. The latest Android Api is 28 (as on sep 26, 2018). Lollipop 5.0 is API 21. Company like GoJek has about 1% employee on API 16. 1% is roughly 10000+ people. So shifting an Api version could be really problematic. We have various workarounds in place for the same.
Recycler View

Lets say, you have to display movies like this. These are similar type of movie cards shown as list. On a screen, we can see only specific movies at a time (Say 10). And we have 100 movies to show. We can show them in list view too. But thats not a good way. The advantage with Recycler view is that only 10 +4 movie cards will be made as on the screen the max which we can view is 10. And as we scroll down, the movie cards gone at top are shown at bottom with data changed. Bind in adapter handles this mapping of data. This number to show the max movies and scrolling is taken care by layout manager.
Fragments

Activity consists of fragments. Fragments are the building blocks. They are like the lightweight activity.
Draw a parallelism to web. We open a single page website and all the views are there. Then we use JS to show one and hide other based on some event. Compare this to a page where we have to submit form.
Gson
Gson is google’s library to parse Json. Convert a Json string to system’s object type (Java/Kotlin).