Note that there are some explanatory texts on larger screens.

plurals
  1. POFragmentPageAdapter quirks and crash
    text
    copied!<p>I am pretty new to android development, and I started with a simple project to learn how to handle most of the basic UI.</p> <p>I've used ActionBarSherlock and ViewPageIndicator, and overall the simple app I've created is working, but I still have some weird problems. Let me describe:</p> <ul> <li>When I click the button that moves a fragment with FragmentPageAdapter into it's place, the transition effect that I assigned to the transaction doesn't occur. It occurs only if I go back (the transaction is added back to stack) and press the button again.</li> <li>If I go back after clicking the button, and then click it again, the fragment is shown - but acts strange and does all kind of strange things, for example, the FragmentPageAdapter thinks it has 5 pages while it's actually 3 (those extra pages are just blank, and their titles also)</li> <li>If I click the button, and then change the orientation of the device, the app crashes - tried debug it, but I get to some code inside the android framework.</li> </ul> <p>I think I'm experiencing all of those problems because I went really wrong somewhere in my code. Please help me understand my problems, and if you can, point me to some good practices or places where I cant read and understand what exactly I've done wrong, and how can I do it the right way.</p> <p>I uploaded the code in question to here: <a href="https://code.google.com/p/mich-android-testapp/source/browse/trunk/TestApp/" rel="nofollow">https://code.google.com/p/mich-android-testapp/source/browse/trunk/TestApp/</a></p> <p>I appreciate any help from you guys!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload