I add and remove fragments like this :
ADD
getSherlockActivity().getSupportFragmentManager()
.beginTransaction()
.setCustomAnimations(R.anim.slide_in_bottom, R.anim.slide_out_top, R.anim.slide_in_top, R.anim.slide_out_bottom)
.add(R.id.fragment_explore, fragment)
.addToBackStack(null)
.commit();
ActivityMain.BACKSTACK_EXPLORE.add(fragment);
REMOVE
Fragment depopFragment = BACKSTACK_EXPLORE.get(BACKSTACK_EXPLORE.size() - 1);
getSupportFragmentManager().beginTransaction()
.setCustomAnimations(R.anim.slide_in_top, R.anim.slide_out_bottom, R.anim.slide_in_bottom, R.anim.slide_out_top)
.remove(depopFragment)
.commit();
BACKSTACK_EXPLORE.remove(depopFragment);
There is a fast slide animation. The fragment comes from bottom and goes back to bottom.
My issue is when you press the back button (depop the fragment) and before the animation is finished you touch the activity that is appearing behind.
It gives me a simple Fatal signal 11 error (more often on samsung galaxy s3)
Any idea ?
I resolved it, it was related to onCreateAnimation() that i used to know when the animation was finished
view.setLayerType(LAYER_TYPE_NONE, null);
this line was doing the crash. It seems to be related to hardware acceleration and most likely only on android 4.3
see this link : Disable hardware acceleration, backward compatibility
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With