nativescript-windowed-modal icon indicating copy to clipboard operation
nativescript-windowed-modal copied to clipboard

Full screen modal height doesn't respect default bottom menu on android platform

Open aljaz00 opened this issue 5 years ago • 6 comments

image I'm using [email protected] and NS6.

Thanks for helping me out.

aljaz00 avatar Oct 29 '19 11:10 aljaz00

Can you please provide a code example to reproduce this issue?

mukaschultze avatar Oct 29 '19 17:10 mukaschultze

image

<template>
  <ModalStack>
    <GridLayout rows="auto, *, auto" columns="*">
      <StackLayout row="0" background="red">
        <Label
          text="Lorem ipsum dolor, sit amet consectetur adipisicing elit. Itaque vel dolores consequatur beatae reiciendis veniam corporis vitae. Qui aperiam veniam labore fugit autem fugiat deserunt dolorum quidem eius, esse reprehenderit!"
          textWrap="true"
          color="white"
        />
      </StackLayout>
      <StackLayout row="1" background="blue"> </StackLayout>
      <StackLayout row="2" background="green">
        <Label
          text="Lorem ipsum dolor, sit amet consectetur adipisicing elit. Itaque vel dolores consequatur beatae reiciendis veniam corporis vitae. Qui aperiam veniam labore fugit autem fugiat deserunt dolorum quidem eius, esse reprehenderit!"
          textWrap="true"
          color="white"
        />
      </StackLayout>
    </GridLayout>
  </ModalStack>
</template>

As you can see the text is chopped at the top and at the bottom.

Thanks for help!

aljaz00 avatar Oct 30 '19 15:10 aljaz00

Try running tns plugin remove nativescript-windowed-modal && tns plugin add nativescript-windowed-modal@next and see if the problem is fixed.

mukaschultze avatar Oct 30 '19 17:10 mukaschultze

Hey, you fixed that problem but create a new one. Now when using a non-fullscreen modal, you can't set the position of the modal, so modal is always in the middle. Of course for android only, IOS is working as expected.

I saw your fix and think a bit about how to solve this new problem:

  1. The solution will be to check if modal is in fullscreen (if possible) and disable height calculation,
  2. Calculate the height of bottom navbar and decrease the current height like so: currentHeight - navbarHeight

Thanks for solving this problem!

aljaz00 avatar Oct 31 '19 11:10 aljaz00

Same for me 👆on Android.

cc @aljaz00 @mukaschultze

romandrahan avatar Nov 20 '19 12:11 romandrahan

I can confirm this as well.

Tyler-V avatar Mar 21 '20 19:03 Tyler-V