标签固定:底部。按钮从肖像转换到风景后,按钮稍微转动 [英] Tabbar fixed:bottom. Buttons shift right slightly after transition from portrait to landscape

查看:150
本文介绍了标签固定:底部。按钮从肖像转换到风景后,按钮稍微转动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

工作灯6.1 Dojo 1.9



创建一个可选的标签栏的ScrollableView:顶部有两个按钮,一个标签栏固定:底部有三个按钮。当应用程序启动标签栏时,按钮的顶部和底部都正确居中。



Android模拟器和Nexus 7设备的测试场景:



1)在纵向模式下,应用程序初始化,并且主视图显示两个标签栏与
按钮正确居中。



2)将设备旋转到横向模式,两个标签栏正确转换。 3)旋转回到纵向模式,选项卡栏固定:顶部正确转换,但是标签栏
固定:底部按钮略微向右移动。重复肖像 - >风景
第二次转换会导致额外的转移。第二班后,
底部标签栏在该位置保持固定。

 固定到顶部的选项卡栏在所有模式转换期间都能正常运行。 

欣赏您可以提供的任何建议。

解决方案

添加以下的CSS在我的测试(包括在Android上)的诀窍:

 < style type =text / css> 
.mblTabBar {
box-sizing:border-box;
}
< / style>

对于未来,为避免需要此解决方法,我注册了 https://bugs.dojotoolkit.org/ticket/17764


Worklight 6.1 Dojo 1.9

Created a ScrollableView with a tab bar fixed:top with two buttons, and a tab bar fixed:bottom with three buttons. When the application starts the tab bars, and buttons are centered correctly for both top and bottom.

Test scenario for both Android emulator, and Nexus 7 device:

1) In portrait mode the application initializes, and the main view shows both tab bars with buttons centered correctly.

2) Rotate the device to landscape mode, and both tab bars transition correctly.

3) Rotate back to portrait mode, and the tab bar fixed:top transitions correctly, but the tab bar fixed:bottom buttons shift right slightly. Repeating the portrait -> landscape transition a second time causes additional shifting right. After the second shift the bottom tab bar remains fixed at that location.

  The tab bar fixed to the top behaves correctly during all mode transitions.  

Appreciate any advice you can provide.

解决方案

Adding the following piece of CSS does the trick in my tests (including on Android):

<style type="text/css">
.mblTabBar {
    box-sizing: border-box;
}
</style>

For the future, to avoid the need of this workaround, I registered https://bugs.dojotoolkit.org/ticket/17764.

这篇关于标签固定:底部。按钮从肖像转换到风景后,按钮稍微转动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆