在我的应用程序中,我正在显示容器中心有照片的图像,并在容器顶部添加了图像按钮 . 它工作正常 . 但是我的一些用户更新到iOS 12并且顶部添加的图像图标不再存在 .
class Screen extends Form{
setLayout(new BorderLayout());
this.getTitleArea().setPreferredH(0);
//photoContainer, where image is placed as imageViewer
Container photoContainer= buildPreviewPane();
addComponent(BorderLayout.CENTER, photoContainer);
buildCommandBar();
}
protected Container buildPreviewPane() {
Container cont = new Container();
cont.setLayout (new BorderLayout());
getStyle().setMargin(0, 0, 0, 0);
getStyle().setPadding(0, 0, 0, 0);
cont.addComponent (BorderLayout.CENTER, new Label(" "));
return cont;
}
protected void buildCommandBar(){
Container c = new Container();
c.setLayout(new BoxLayout(BoxLayout.X_AXIS));
c.getStyle().setPadding(Component.TOP, 40);
int size = Display.getInstance().convertToPixels(4, false);
if (Display.getInstance().isTablet()) {
size *= 2;
}
Button deleteCommand = new Button();
try {
Image im = Image.createImage("/Delete-64-lygrey.png").scaled(size - 2, size - 2);
deleteCommand.setIcon(im);
}
catch (Exception e){}
c.addComponent(deleteCommand);
Button okCommand = new Button();
try {
Image im = Image.createImage("/Checked-64-ltgrey.png").scaled(size - 2, size - 2);
okCommand.setIcon(im);
}catch (Exception e){}
c.addComponent(okCommand);
addComponent(BorderLayout.NORTH, c);
}
因此,在组件的北部添加了两个命令/按钮(删除和确定) . 更新到iOS 12后,这些按钮是不可见的 . 我已经使用多年,并且工作正常到现在,我的一些客户在升级到iOS 12时遇到了这个问题 . 在iOS 11.4.1上工作正常 . 因此,从第一张图片中可以看到或呈现在该表单中的图标,第二张图片表示安装iOS 12时的图标,图标丢失,只有一个图标,如果您一次又一次地重新访问该表单,所有图标都丢失了 . 那么,什么爆发了?任何帮助都会非常有帮助 .