0

I have the following program layout. The numbers on the left are list view, and radio group on the right is ViewPager fragment. When the number from the list is selected the appropriate radio group is displayed.

When submit button is clicked, I want to disable all radio groups and highlight correct answer choice in each group.

To achieve this, in my fragment manager class inside method public View onCreateView I disable each radio button using setEnabled(false) and highlight them using setBackgroundColor(Color.GREEN). But this does not work as expected.

It disables radio button and changes background color but only when I change from one fragment to another several times. There is no instant update of current view.

What can be a problem? enter image description here

Asterisk
  • 3,534
  • 2
  • 34
  • 53
  • Why do you perform these updates in the onCreateView method? You should to do it while processing onClick event for submit button – Eugene Popovich Jun 04 '13 at 11:36
  • It seems processing from the Activity is harder than inside the fragment... May be I am missing something? – Asterisk Jun 04 '13 at 11:45

0 Answers0