(draft) `Day51` - Read articles related to layout ...
# 100daysofkotlin-2021
j
(draft)
Day51
• Read articles related to layout inspector ◦ android official document Debug Your layout with Layout Inspector and Layout Validation ◦ android official medium Layout Inspector ◦ Lesson today - let’s update things on time ^^,, • Getting grasp of current sprint (Adding a third party payment, Overall update related to store&promotion section)
1. Error log • While I was inspecting the current sprint branch (WIP branch of my supervisor), I faced an error
Copy code
...databinding/ActivityWalletBindingImpl.java:186: 
error: reference to getCouponCount is ambiguous                    
viewModelCouponCount = viewModel.getCouponCount();
                                               ^
both method getCouponCount() in WalletViewModel and method getCouponCount() in WalletViewModel match
• Original code was like below.
Copy code
val couponCount = MutableLiveData<Int>()
fun getCouponCount() { ...
• There was only one method getCouponCount() in the view model, but error log kept saying that there were two getCouponCount. Thought this was strange, but I thought that maybe livedata thing auto produces some getter & setter implicitly. So it worked after I changed the method’s name into getCouponNum. • https://heenustroy.tistory.com/150 -> seems that my inference was right..
?? why can’t i edit
??? hmm
Day51
• Read articles related to layout inspector ◦ android official document Debug Your layout with Layout Inspector and Layout Validation ◦ android official medium Layout Inspector ◦ Lesson today - let’s update things on time ^^,, • Getting grasp of current sprint (Adding a third party payment, Overall update related to store&promotion section) ◦ Something did not work as I expected. I was subscribing an rx subject and update the UI accordingly. Subscription was working well as I printed the logs, but text did not show up. ◦ It was.. really dumb reason. I just didn’t catchup my supervisor’s custom view attributes. Default text color was white.. so I was just not able to see that;;; As I changed the color, it worked. How dumb… But still it wasn’t just waste of time… I had to review the structure related to that part thoroughly