Closed HemangNakarani closed 3 years ago
@HemangNakarani I want to work on this issue.
Sure !! Assigned 👍
@HemangNakarani Do we have the questions ready for our app or I should put the above questions in image for now?
Not those questions specifically, bur keep some demo questions, So we can change it later, You will also need to write code for making recyclerView and Pojo class for Question-Answers.
So I'll increase points.
Ok cool. What I will try to do is first create a layout for the question-answers for recyclerView view holder. Then I will create a POJO class named something like "Help" or anything and it will contain the question, answer String variables and related getter, setters. Then I will also create a custom adapter for our question-answer recyclerView to populate the views. What do you think about this?
Yes Exactly, And for showing items in recycler view, just statically define ArrayList of Que-Ans objects for now.
I tried to implement this with the simple RecyclerView. But the problems here are:
To implement the expanding functionality, we have to implement onClick() on each view holder of recycler view manually which can degrade performance.
To collapse any expanded question when another question is selected, we need to check by iterating over all ArrayList questions whether they are expanded or not every time. This can also degrade performance.
Any suggestions??
Well,
To collapse any expanded question when another question is selected, we need to check by iterating over all ArrayList questions whether they are expanded or not every time. This can also degrade performance
will not be the actual case. Just think a little bit about it.onClickListner
in onBindViewHolder
. It is the right place to call itemClickListner for recycler view item. So there will not be any load. Refer this.@fenu28 any progress in it?
@HemangNakarani sorry for the delay. I have exchanged my old laptop for a new one so it's taking time # get so much data from Google Drive. And regarding this issue, only the "one at a time question" feature is to be implemented. Currently by my modification, more than one question answer can stay open.
give @fenu28 75 points