Fix bottomsheet misplacing after fullscreen change

This commit is contained in:
Sylvia van Os
2021-01-26 22:39:01 +01:00
parent 6a80c633a8
commit 58f8a6a929
4 changed files with 39 additions and 18 deletions

View File

@@ -378,8 +378,6 @@ public class LoyaltyCardViewActivity extends AppCompatActivity
maximizeButton.setVisibility(View.GONE);
barcodeImage.setVisibility(View.GONE);
}
Log.d(TAG, String.valueOf(bottomSheet.getTop()));
}
@Override
@@ -545,7 +543,6 @@ public class LoyaltyCardViewActivity extends AppCompatActivity
cardIdFieldView.setVisibility(View.GONE);
bottomSheet.setVisibility(View.GONE);
behavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
Log.d(TAG, String.valueOf(bottomSheet.getTop()));
editButton.hide();
// Set Android to fullscreen mode
@@ -583,7 +580,6 @@ public class LoyaltyCardViewActivity extends AppCompatActivity
// Show other UI elements
cardIdFieldView.setVisibility(View.VISIBLE);
makeBottomSheetVisibleIfUseful();
Log.d(TAG, String.valueOf(bottomSheet.getTop()));
editButton.show();
// Unset fullscreen mode
@@ -593,11 +589,6 @@ public class LoyaltyCardViewActivity extends AppCompatActivity
& ~View.SYSTEM_UI_FLAG_FULLSCREEN
);
// FIXME: Figure out why the bottom sheet gets paddingTop 24px sometimes
// For some reason bottom sheet can get a 24px padding top after we enter and then leave fullscreen mode
// No clue why
// Android library bug?
// Set current state
barcodeIsFullscreen = false;
}