https://kotlinlang.org logo
Title
m

Mo

06/28/2020, 4:02 PM
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

Jakekudur

06/28/2020, 4:24 PM
Did u try btn.isClickable = false/true ?
m

Mo

06/28/2020, 4:37 PM
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

Jakekudur

06/29/2020, 7:13 AM
Why don't you use radio group?
m

Mo

06/29/2020, 12:36 PM
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

Jakekudur

06/29/2020, 12:39 PM
Yes, u can remove circiles and customize radio button for any UI u wish, I am sure it will solve your many problems.
m

Mo

06/29/2020, 1:37 PM
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