Fix some bad behavior when closing

This commit is contained in:
tom79 2019-07-02 18:43:33 +02:00
parent cfd0072219
commit 4cc5a99b71
1 changed files with 7 additions and 8 deletions

View File

@ -170,10 +170,9 @@ public class ViewAnimator<T extends Resourceble> {
public void onAnimationEnd(Animation animation) { public void onAnimationEnd(Animation animation) {
view.clearAnimation(); view.clearAnimation();
view.setVisibility(View.INVISIBLE); view.setVisibility(View.INVISIBLE);
if (position == viewList.size() - 1) {
animatorListener.enableHomeButton(); animatorListener.enableHomeButton();
drawerLayout.closeDrawers(); drawerLayout.closeDrawers();
}
} }
@Override @Override
@ -192,13 +191,13 @@ public class ViewAnimator<T extends Resourceble> {
public interface ViewAnimatorListener { public interface ViewAnimatorListener {
public ScreenShotable onSwitch(Resourceble slideMenuItem, ScreenShotable screenShotable, int position); ScreenShotable onSwitch(Resourceble slideMenuItem, ScreenShotable screenShotable, int position);
public void disableHomeButton(); void disableHomeButton();
public void enableHomeButton(); void enableHomeButton();
public void addViewToContainer(View view); void addViewToContainer(View view);
} }
} }