Skip to content

Commit

Permalink
Fix issues #8
Browse files Browse the repository at this point in the history
  • Loading branch information
liang02.wang committed Jan 15, 2020
1 parent c315292 commit 16e6d5f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
7 changes: 1 addition & 6 deletions core/src/main/java/me/liam/support/SupportActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import android.view.MotionEvent;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

import androidx.annotation.Nullable;
Expand Down Expand Up @@ -40,15 +39,11 @@ public void onBackPressed() {
ActivityCompat.finishAfterTransition(this);
return;
}
if (activeFragment.dispatcherOnBackPressed()){
return;
}
if (activeFragment.dispatcherOnBackPressed()) return;
pop();
}else {
ActivityCompat.finishAfterTransition(this);
}


}

@Override
Expand Down
11 changes: 3 additions & 8 deletions core/src/main/java/me/liam/support/SupportFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -614,14 +614,9 @@ public void onContentViewSwipedBack() {
if (before != null){
onSwipeDrag(before,SwipeBackLayout.STATE_IDLE,0);
}
getHandler().post(new Runnable() {
@Override
public void run() {
((SupportActivity)getActivity())
.getSupportTransaction()
.remove(current,false);
}
});
((SupportActivity)getActivity())
.getSupportTransaction()
.remove(current,false);
((SupportActivity)getActivity()).fragmentSwipeDrag = false;
}

Expand Down

0 comments on commit 16e6d5f

Please sign in to comment.