Hello
After adding the view pager and FragmentStatePagerAdapter (from Chapter 11: Using ViewPagers), the new CrimePagerActivity does start and I can swipe forward normally, but if I try to swipe to the Crime where I came from, the app freezes for a second then restarts the app back to the list view.
For example, if I start at Crime 3, I can move forward to 4 (or backwards to 2), but if I move back to 3, it will freeze and crash.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Stack trace of error:
11-02 13:23:23.906 4592-4592/com.bignerdranch.android.criminalintent E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.bignerdranch.android.criminalintent, PID: 4592
java.lang.StackOverflowError: stack size 8MB
at com.bignerdranch.android.criminalintent.CrimeFragment$1.beforeTextChanged(CrimeFragment.java:0)
at android.widget.TextView.sendBeforeTextChanged(TextView.java:8268)
at android.widget.TextView.setText(TextView.java:4356)
at android.widget.TextView.setText(TextView.java:4313)
at android.widget.EditText.setText(EditText.java:84)
at android.widget.TextView.setText(TextView.java:4288)
at com.bignerdranch.android.criminalintent.CrimeFragment$1.onTextChanged(CrimeFragment.java:67)
at android.widget.TextView.sendOnTextChanged(TextView.java:8318)
at android.widget.TextView.setText(TextView.java:4459)
at android.widget.TextView.setText(TextView.java:4313)
at android.widget.EditText.setText(EditText.java:84)
at android.widget.TextView.setText(TextView.java:4288)
at com.bignerdranch.android.criminalintent.CrimeFragment$1.onTextChanged(CrimeFragment.java:67)
at android.widget.TextView.sendOnTextChanged(TextView.java:8318)
at android.widget.TextView.setText(TextView.java:4459)
at android.widget.TextView.setText(TextView.java:4313)
at android.widget.EditText.setText(EditText.java:84)
at android.widget.TextView.setText(TextView.java:4288)
at com.bignerdranch.android.criminalintent.CrimeFragment$1.onTextChanged(CrimeFragment.java:67)
at android.widget.TextView.sendOnTextChanged(TextView.java:8318)
at android.widget.TextView.setText(TextView.java:4459)
at android.widget.TextView.setText(TextView.java:4313)
at android.widget.EditText.setText(EditText.java:84)
at android.widget.TextView.setText(TextView.java:4288)
at com.bignerdranch.android.criminalintent.CrimeFragment$1.onTextChanged(CrimeFragment.java:67)
at android.widget.TextView.sendOnTextChanged(TextView.java:8318)
at android.widget.TextView.setText(TextView.java:4459)
at android.widget.TextView.setText(TextView.java:4313)
at android.widget.EditText.setText(EditText.java:84)
at android.widget.TextView.setText(TextView.java:4288)
at com.bignerdranch.android.criminalintent.CrimeFragment$1.onTextChanged(CrimeFragment.java:67)
at android.widget.TextView.sendOnTextChanged(TextView.java:8318)
at android.widget.TextView.setText(TextView.java:4459)
at android.widget.TextView.setText(TextView.java:4313)
at android.widget.EditText.setText(EditText.java:84)
at android.widget.TextView.setText(TextView.java:4288)
at com.bignerdranch.android.criminalintent.CrimeFragment$1.onTextChanged(CrimeFragment.java:67)
at android.widget.TextView.sendOnTextChanged(TextView.java:8318)
at android.widget.TextView.setText(TextView.java:4459)
at android.widget.TextView.setText(TextView.java:4313)
at android.widget.EditText.setText(EditText.java:84)
at android.widget.TextView.setText(TextView.java:4288)
at com.bignerdranch.android.criminalintent.CrimeFragment$1.onTextChanged(CrimeFragment.java:67)
at android.widget.TextView.sendOnTextChanged(TextView.java:8318)
at android.widget.TextView.setText(TextView.java:4459)
at android.widget.TextView.setText(TextView.java:4313)
at android.widget.EditText.setText(EditText.java:84)
at android.widget.TextView.setText(TextView.java:4288)
at com.bignerdranch.android.criminalintent.CrimeFragment$1.onTextChanged(CrimeFragment.java:67)
at android.widget.TextView.sendOnTextChanged(TextView.java:8318)
at android.widget.TextView.setText(TextView.java:4459)
at android.widget.TextView.setText(TextView.java:4313)
at android.widget.EditText.setText(EditText.java:84)
at android.widget.TextView.setText(TextView.java:4288)
at com.bignerdranch.android.criminalintent.CrimeFragment$1.onTextChanged(CrimeFragment.java:67)
at android.widget.TextView.sendOnTextChanged(TextView.java:8318)
at android.widget.TextView.setText(TextView.java:4459)
at android.widget.TextView.setText(TextView.java:4313)
at android.widget.EditText.setText(EditText.java:84)
at android.widget.TextView.setText(TextView.java:4288)
at com.bignerdranch.android.criminalintent.CrimeFragment$1.onTextChanged(C
11-02 13:23:23.998 4592-4592/com.bignerdranch.android.criminalintent E/JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 1896744)
11-02 13:23:24.007 4592-4592/com.bignerdranch.android.criminalintent E/AndroidRuntime: Error reporting crash
android.os.TransactionTooLargeException: data parcel size 1896744 bytes
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:505)
at android.app.ActivityManagerProxy.handleApplicationCrash(ActivityManagerNative.java:4427)
at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:90)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Also, I noticed in the solutions file that Big Nerd Ranch does not have the static newInstance method in CrimeFragment.java for chapter 11.
Please assist.