Skip to content

Commit

Permalink
Fix some visual bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
SlaVcE14 committed Feb 2, 2024
1 parent b3b6a23 commit 50a60d3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/src/main/java/com/sjapps/jsonlist/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ protected void onCreate(Bundle savedInstanceState) {
autoTransition.setDuration(150);
menuBtn.setOnClickListener(view -> open_closeMenu());

backBtn.setOnClickListener(view -> getOnBackPressedDispatcher().onBackPressed());
backBtn.setOnClickListener(view -> {
if(!data.isEmptyPath()) getOnBackPressedDispatcher().onBackPressed();
});
openFileBtn.setOnClickListener(view -> ImportFromFile());

menu.findViewById(R.id.openFileBtn2).setOnClickListener(view -> {
Expand Down Expand Up @@ -262,7 +264,7 @@ public void handleOnBackPressed() {
.show();
return;
}

TransitionManager.endTransitions(viewGroup);
TransitionManager.beginDelayedTransition(viewGroup, autoTransition);
data.goBack();
open(JsonData.getPathFormat(data.getPath()), data.getPath(),-1);
Expand Down Expand Up @@ -378,6 +380,7 @@ private void LoadData(String Data) {
}

public void open(String Title, String path, int previousPosition) {
TransitionManager.endTransitions(viewGroup);
TransitionManager.beginDelayedTransition(viewGroup, autoTransition);

if (isMenuOpen)
Expand Down

0 comments on commit 50a60d3

Please sign in to comment.