//獲取屏幕寬度
var Dimensions = require('Dimensions');
var width = Dimensions.get('window').width;
console.log(width);
react native 中獲取屏幕寬度方法
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
react native 子控件傳遞數據給父控件
hehe0705
2020-02-21 13:21:46
react 不可控組件與可控組件的區別
hehe0705
2020-02-21 13:21:45
react native 控件聯動
hehe0705
2020-02-21 13:21:45
react native 初接觸
hehe0705
2020-02-21 13:21:45
前端面向對象的登錄寫法
hehe0705
2020-02-21 13:21:45
Xcode真機調試閃退,模擬器可以,或者提示install succeesed but not install bundleID=的原因及處理
qq_41756364
2020-06-21 13:47:44
Xcode the package is missing an Info.plist or the CFBundlePackageType is not 'APPL'
qq_41756364
2020-06-21 13:47:32
react native 子控件傳遞數據給父控件
hehe0705
2020-02-21 13:21:46
react 不可控組件與可控組件的區別
hehe0705
2020-02-21 13:21:45
react native 控件聯動
hehe0705
2020-02-21 13:21:45
react native 初接觸
hehe0705
2020-02-21 13:21:45
前端面向對象的登錄寫法
hehe0705
2020-02-21 13:21:45
關於Iconfont在IOS上的設置以及踩坑
qq_41756364
2019-08-09 00:04:28
ReactNative遷移更新後報連接不上,404與Attempted to readonly property
qq_41756364
2018-11-07 06:17:49
React Native (IOS和Android) 支付寶和微信支付集成實戰(支付寶服務端篇)
qq_41756364
2018-09-18 05:27:16