jeanregisser / react-native-popover

A <Popover /> component for react-native
660 stars 176 forks source link

Add Android support fixing the arrow #36

Open gyfelton opened 7 years ago

gyfelton commented 7 years ago

The main problem of Android is that it does not allow bleed out subview to be displayed, unlike iOS

The fix here is to make the Popover View (styles.popover) larger so that arrow can be displayed

To achieve this, not only margin is added based on the position of the arrow, the followings are also done to help achieve the final result:

  1. if auto placement is used, then during the geometry calculation the right placement will be returned and updated internally (the placement state)
  2. if placement is bottom or right, then content itself will be moved (in terms of left and top property) to accommodate the arrow

Tested in our app and it works for us.

I cannot create a android project due to time constrain, maybe someone can help?

zhaoqianpeng123 commented 6 years ago

Hi, can you tell me how to fix it , follow your step ,i can not how to modify ,thanks