New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dfocus-fm-cordova-plugin-statusbar-height

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dfocus-fm-cordova-plugin-statusbar-height

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Fork https://github.com/wangjunget/cordova-plugin-statusbar-height

cordova-plugin-statusbar-height

获取Android,iOS状态栏高度

Installation

cordova plugin add https://github.com/zhushiyao/cordova-plugin-statusbar-height.git

Methods

window.StatusBarHeight.getValue

window.StatusBarHeight.getValue

Description

获取状态栏高度值,值类型为设备独立像素值。

Demo

document.addEventListener('deviceready', getStatusbarHeight, false);
function getStatusbarHeight() {
    window.StatusBarHeight.getValue(
        function(value) {
            console.log(value);
        },
        function(error) {
            console.log(error);
        }
    )
}

Tips

  • 该插件获取到的值为设备独立像素值,如需要物理像素值可自行转换

    var value; // 插件获取到的独立像素值
    var pdr = window.devicePixelRatio; // 获取设备独立像素比
    var px = value * pdr; // 得到物理像素值
    

Supported Platforms

  • andorid
  • ios

Keywords

FAQs

Package last updated on 10 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc