This is making all my questions null once it goes ...
# android
m
This is making all my questions null once it goes to the question as the submit button was pressed in q1, i need it to nullify the options once the submit button has been pressed in each question and then un-nullify when going to the next question. Rather than just nullifying the options for all questions once submit has been pressed in one. I guess once it goes to the next question, they should be tv_option_(number of option).setOnClickListener(this) again. Can't seem to get it to work. For context making a quiz app, any help appreciated!
j
Did u try btn.isClickable = false/true ?
m
Thanks for the reply, if I do this and set them to isClickable = false, I have the issue where all options after question 2 become not clickable. How can I make them clickable once you go onto a next question? finding that difficult so should apply to current question 1 (choose option, submit button pressed -> options not clickable), question 2 (submit button pressed -> options not clickable) etc. However I have it when you are on question 2, you cannot choose any options to submit
j
Why don't you use radio group?
m
Whats the benefit of radio group? Right now the options I have are textviews so tv_option_one is the id of textview. If i use radio group, can I still make it look like a box that highlights when clicked on? rather than an option with circle
j
Yes, u can remove circiles and customize radio button for any UI u wish, I am sure it will solve your many problems.
m
Thanks but how can it solve the issue of not changing answers? Thanks
Still has the same issue, I need to include a method like the one above that i'm trying to implement, this is more code: https://codeshare.io/5ZxXvn