在我的cn1项目中,Label,Button和TextField的顶部和左侧边框未显示在Android 7.0设备上 . 模拟器显示所有边框都正确 . 可以使用当前cn1版本4.x上的SignatureComponentDemo中的代码轻松复制该问题,主题为FlatXXXX,也使用线条边框而不是边框图像 .

我在Intellij Idea上创建了一个新的FlatBlue“Get Started App”,并通过SignatureComponentDemo中的代码替换了MyApplication中的init(),start(),stop()和destroy()代码 . 演示中名称的TextField正确显示模拟器上的线条边框 . 一个带有Android 7.0的Galaxy S7边缘缺少TextField的顶部和左边框 . 为这些组件添加更多填充无效 . 通过将includeNativeBool设置为false来禁用加载本机主题也无效 . 唯一相关的代码在以下方法中:

public void start() {
    if(current != null){
        current.show();
        return;
    }
    Form hi = new Form("Signature Component");
    hi.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
    hi.add("Enter Your Name:");
    hi.add(new TextField());
    hi.add("Signature:");
    SignatureComponent sig = new SignatureComponent();
    sig.addActionListener((evt)-> {
        System.out.println("The signature was changed");
        Image img = sig.getSignatureImage();
        // Now we can do whatever we want with the image of this signature.
    });
    hi.addComponent(sig);
    hi.show();
}

这个问题有解决方法吗?我需要使用TableLayout构建一个组件表 . 表类没有选项,因为我需要绘制不同颜色和厚度的边框,并希望使用TableLayout作为布局管理器将这些应用于容器内的容器和组件 .