jawidMuhammadi commented on a change in pull request #97:
URL: https://github.com/apache/fineract-cn-mobile/pull/97#discussion_r437166483
##########
File path:
app/src/main/java/org/apache/fineract/ui/base/FineractBaseActivity.java
##########
@@ -169,15 +171,29 @@ public void replaceFragment(Fragment fragment, boolean
addToBackStack, int conta
if (!fragmentPopped &&
getSupportFragmentManager().findFragmentByTag(backStateName) ==
null) {
+ Fragment previousFragment =
getSupportFragmentManager().findFragmentById(containerId);
FragmentTransaction transaction =
getSupportFragmentManager().beginTransaction();
+ transition(previousFragment, fragment);
transaction.replace(containerId, fragment, backStateName);
if (addToBackStack) {
transaction.addToBackStack(backStateName);
}
- transaction.commit();
+ transaction.commitAllowingStateLoss();
}
}
+ public void transition(Fragment previousFragment, Fragment nextFragment){
+ if(previousFragment!=null) {
+ Fade exitFade = new Fade();
+ exitFade.setDuration(250);
Review comment:
Instead of hardcoded values, it would be much better if we use standard
timing suggested by Googlers like this:
`exitFade.setDuration(android.R.integer.config_shortAnimTime)`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]