Change safe-area from position to padding
Makes the view stretch to the size of safe area instead of moving it from bottom. Fixes transparent background on navigation animation iPhoneX. Fixes #9695 Do not set cover bg on android Signed-off-by: yenda <eric@status.im>
This commit is contained in:
parent
83b738ee02
commit
cb081f6d96
|
@ -104,9 +104,8 @@
|
||||||
|
|
||||||
(defn tabs-animation-wrapper-ios
|
(defn tabs-animation-wrapper-ios
|
||||||
[content]
|
[content]
|
||||||
[react/view
|
[react/view {:style tabs.styles/title-cover-wrapper-ios}
|
||||||
[react/view
|
[react/view
|
||||||
{:style tabs.styles/title-cover-wrapper}
|
|
||||||
content
|
content
|
||||||
(when platform/iphone-x?
|
(when platform/iphone-x?
|
||||||
[react/view
|
[react/view
|
||||||
|
@ -119,7 +118,7 @@
|
||||||
keyboard-shown?
|
keyboard-shown?
|
||||||
(main-tab? view-id))}
|
(main-tab? view-id))}
|
||||||
[react/view
|
[react/view
|
||||||
{:style tabs.styles/title-cover-wrapper}
|
{:style tabs.styles/title-cover-wrapper-android}
|
||||||
content]])
|
content]])
|
||||||
|
|
||||||
(defn tabs-animation-wrapper [keyboard-shown? view-id tab]
|
(defn tabs-animation-wrapper [keyboard-shown? view-id tab]
|
||||||
|
|
|
@ -129,20 +129,27 @@
|
||||||
:position :absolute
|
:position :absolute
|
||||||
:height (- tabs-height minimized-tabs-height)
|
:height (- tabs-height minimized-tabs-height)
|
||||||
:align-self :stretch
|
:align-self :stretch
|
||||||
:top tabs-height
|
:top 0
|
||||||
:right 0
|
:right 0
|
||||||
:left 0})
|
:left 0})
|
||||||
|
|
||||||
(def title-cover-wrapper
|
(def title-cover-wrapper-ios
|
||||||
{:position :absolute
|
{:left 0
|
||||||
:height tabs-height
|
:right 0
|
||||||
:bottom (if platform/iphone-x? 34 0)
|
:bottom 0
|
||||||
|
:padding-bottom (if platform/iphone-x? 34 0)
|
||||||
|
:position :absolute
|
||||||
|
:background-color :white})
|
||||||
|
|
||||||
|
(def title-cover-wrapper-android
|
||||||
|
{:left 0
|
||||||
:right 0
|
:right 0
|
||||||
:left 0})
|
:bottom 0
|
||||||
|
:position :absolute})
|
||||||
|
|
||||||
(defn animation-wrapper [keyboard-shown? main-tab?]
|
(defn animation-wrapper [keyboard-shown? main-tab?]
|
||||||
{:height (cond
|
{:height (cond
|
||||||
keyboard-shown? 0
|
keyboard-shown? 0
|
||||||
main-tab? tabs-height
|
main-tab? tabs-height
|
||||||
:else minimized-tabs-height)
|
:else minimized-tabs-height)
|
||||||
:align-self :stretch})
|
:align-self :stretch})
|
||||||
|
|
Loading…
Reference in New Issue