I have checked and rechecked my code, and I still cannot figure out why my CrimeFragment s are not being updated 100% by the ViewPager after swiping. The contents of the EditText box and the CheckBox are not being updated. The actionbar title is changing properly and the ViewPager is behaving properly otherwise. I mean it stops me from swiping right when I am viewing crime #0 (beginning of list of crimes).
If I click on a crime in the list, I do get a view with correct values for the EditText content and CheckBox state. This part works fine. If I hit the back button and click on a different crime in the list, same thing… it works perfect. The problem is when I swipe left or right. If I click on say, Crime #3, it shows me the correct Crime #3 fragment with correct values (Crime #3 for the actionbar title and Crime #3 shown in the EditText field, also the checkbox is unchecked like it should be for crime 3). When I swipe right (which should take me left to display the previous Crime #2) I see “Crime #2” in the actionbar title, but then the EditText shows “Crime #3” still. Also, the checkbox is still unchecked like it was in crime 3.
Does anyone know where my problem would be located in the code? I will happily supply the code for whichever classes/layout files that might be the culprit. Just tell me which ones please.