JungIn Choi
04/19/2021, 1:22 PMDay35
• Completed SearchLocation demo
◦ Implement pagination (infinite scroll)
▪︎ There were some issues I faced.
▪︎ First and most dumbest. I had to implement scrollable RecyclerView demo but I just can't scroll the view. Ta da, I just enlarged the font size. It was just un-scrollable since the font was small and they all matched its parent.
▪︎ Second, as I scrolled, contents of next page should be retrieved but contents of.. next,. next.. next.. and next page came. It was some well known issue for 'detecting the bottom of the scrollable page'. onScrollListener was somehow uhh.. sensitive. Replaced my dirty if statement with recyclerView.canScrollVertically.
▪︎ Third, contents should be added to the bottom, so that I can scroll both to top and bottom, but I was just replacing the RecyclerView views with the next page's contents. So I implemented addItem, setItem on adapter class. Then I had to call some recyclerview methods such as notifyItemRangeInserted.
◦ Implement onclick handler for RecyclerView items (connecting to Webview with corresponding url)
▪︎ Connecting to WebView was not that hard, but umm thinking "where to" and "how to" add such click handler was quite difficult to think of. I just had to refer to some medium guy, declaring an interface inside adapter. Then implement it at main activity, pass the url by setting parameters etc.
Self-Comment
• Well I'm working quite hard, but I quite feel slow. Hmm.. hope I speed up as I learn more and more.
• There are some points I have to thoroughly revisit and I should analyze notes for the implementation steps. (I was writing one till pagination, but as I faced some issues, I was just busy googling for my issues) Should be my after-work / weekend goals.
Goals Tomorrow
• Next homework project. Using Naver map api, polygon? thing