Fix crash when switching between LTR/RTL

When the language is changed the order of tabs might change but
the fragments stored in the fragment manager remains the same (becauase
the fragment manager persists fragments across rotation and configuration
changes).

Retrieve the fragments from the fragment manager in an RTL adjusted
fashion in instantiateItem, and also make the logic more resilient to
ClassCastExceptions.

Bug: 17673059
Change-Id: I1f9b7d85b6a4ecf3ff155c9e6e8cf875ddd51463
1 file changed
tree: 7fc6261dfefc4cf3d1529be151b8898ecb8ab0d8
  1. res/
  2. src/
  3. tests/
  4. Android.mk
  5. AndroidManifest.xml
  6. proguard.flags