JungIn Choi
05/19/2021, 3:38 PMDay59
• Replaced contents of pass history recyclerview with actual backend api
◦ Before, I temporarily set up the layout with riding history api. Replaced it with pass history
• Minor layout fixes (Hide webview scrollbar, Change button text after user refunds.)
• Add textview constraint layout dynamically inside flexbox
◦ Had to communicate with backengineer. I had to send GET request, parse an attribute, which was originally a Json object. However I had to draw things in order, which Json object does not support. So, I requested him to send a list of json object, with fixed keys (title, content)
• Refunding dialog (set up the basic flow and succeeded to show up the dialog)
Goals Tomorrow
• Resolve recyclerview infinite loading problem
◦ There was no problem with fixed recyclerview size. But the designer required the view itself to be expanded as the user scolls down, I put it inside the nested scroll view, and infinite loading pops up. Have to fix this issue
• String resource <s> tag doesn’t work. It’s quite weird, since I did underlining with <u> well.
◦ My current approach
▪︎ 1) define a string resource <string name="pass_refund_str"><s>%d원</s>%d원</string>
▪︎ 2) define a method inside view model (like below)
fun getCharged(): String{
when(item?.payStatus){
...
PayStatus.CHARGE_REFUND.ordinal -> {
return contextUtils.getString(R.string.pass_refund_str).format(item?.excessAmount, item?.remainAmount)
}
...
}
}
▪︎ 3) Set the textview text as android:text="@{viewModel.getCharged()}"
◦ Problem is, %d원%d원
appears without strike tag being applied. First, I thought that it was the problem with this html tag, maybe deprecated or sth. However, as I changed that with <b> bold tag or <u> underline tag, both of other tags did not worked too. But I used string resource formatting on other places, so I have no idea what the reason might be. %d
integer value goes in well, so it won’t be some view model binding problem.
• Complete refunding logic (Refund api)
• Add payment bottomsheet