Skip to content

Commit bc6e66f

Browse files
author
lucas
committed
- 优化AppletSize实现
- h5容器refresh会展示提至顶层
1 parent efcba3a commit bc6e66f

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

VideoOS/LuaViewSDK/src/com/taobao/luaview/util/VisionUtil.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ public class VisionUtil {
1515
*/
1616
public static Pair<Float, Float> getVisionProgramSize() {
1717
int screenHeight = AndroidUtil.getScreenHeight(getContext());
18-
int screenWidth = AndroidUtil.getScreenWidth(getContext()) - DimenUtil.dpiToPx(44f);
18+
int screenWidth = AndroidUtil.getScreenWidth(getContext());
1919

20-
float height = DimenUtil.pxToDpi(Math.min(screenWidth,screenHeight));
21-
float width = height / 375.0f * 230;
2220

21+
float height = Math.min(screenWidth,screenHeight) - DimenUtil.dpiToPx(44f);
22+
float width = Math.min(screenWidth,screenHeight) / 375.0f * 230;
2323

24-
return new Pair<>(width,height);
24+
25+
return new Pair<>(DimenUtil.pxToDpi(width),DimenUtil.pxToDpi(height));
2526
}
2627
}

VideoOS/venvy_pub/src/main/java/cn/com/videopls/pub/VideoProgramTypeBView.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ public void start(@NonNull String appletId, String data, int orientationType, bo
149149
if (h5ProgramMap.containsKey(appletId)) {
150150
VenvyLog.d("h5 appletId is exists");
151151
VideoWebToolBarView h5View = h5ProgramMap.get(appletId);
152+
h5View.bringToFront();
152153
h5View.reload(appletId);
153154
currentH5Program = h5View;
154155
currentProgram = null;

0 commit comments

Comments
 (0)