nstudio / nativescript-cardview

:diamonds: :clubs: NativeScript widget for Material Design CardView
MIT License
282 stars 51 forks source link

Using the status bar height can return invalid values when in landscape #19

Closed NathanaelA closed 8 years ago

NathanaelA commented 8 years ago

This will fix the issue when creating this on a device in Landscape mode. StatusBar height on all iOS devices is a fixed 20 pixels. So we are going to hard code this; since this value may be returned as 0, 20, 40, or 9999... Width maybe returned as 0, or the height or the width depending on orientation. Since we really only want the width of the screen, we are switching to use the platform module to get screen width so that it is consistent.