1.问题:android list 有虚拟按键的情况下,底部会被遮挡
2.问题截图:
被遮挡:
正常:
3.list高度计算方法:
屏幕高度-状态栏高度-底部tab高度-提货标题高度-商品快递高度(100写死)
试着判断是否有虚拟按键的情况下 多减去虚拟按键的高度 也还是不行 会被遮挡
var tabHostHeight = 100.0;
//dp2px 转换
var self = this;
var navBarHeight=0;
var tabBarHeight=0;
require('@weex-module/utilmodel').dp2px(function (ret) {
var scale = env.scale;
var deviceWidth = env.deviceWidth / scale;
navBarHeight = (750.0 / deviceWidth)*ret;
tabBarHeight = (750.0 / deviceWidth)*ret;
},48);
//状态栏高度
require('@weex-module/utilmodel').getStatusHeight(function (ret) {
var scale = env.scale;
var deviceWidth = env.deviceWidth / scale;
this.pageHeight = env.deviceHeight * 750 / env.deviceWidth - navBarHeight - tabBarHeight - tabHostHeight-ret;
this.tableHeight = this.pageHeight;
});
大家讲道理2017-04-18 09:22:08
0.11.0, source code dependency method,
I tried the following method but it still doesn’t work.
Because of the fragmentation of Android phones, screen adaptation is difficult. The interface render provided by Weex needs to dynamically pass in the width and height of the container, but the width and height passed in sometimes change, for example, the ActionBar is hidden, etc. This means that the incoming Weex container must also undergo corresponding changes.
In order to adapt to this change, Weex provides the interface WXSDKInstance.setSize(int width, int height) to change the size of the container.
/**
@param width container width
@param height container height
*/
public void setSize(int width, int height){};
PHP中文网2017-04-18 09:22:08
Calculated based on different resolutions, it can be directly fixed on wxc-tabbar Okay
大家讲道理2017-04-18 09:22:08
Since the view position of the fragment is controlled by you, then directly fill in the position you want. The vue page only needs to be filled in, and then use your fragment to host your *.js file.