黑色内容窗格而不是平铺背景

时间:2016-06-01 11:06:36

标签: codenameone

我有一个带有平铺背景的表单,在模拟器中运行良好。

然而,在设备上,内容窗格的背景在瞬间(IOS或Android)之后被绘制为黑色。 显然,首先正确绘制表单,因为应用程序的初始图像是由构建过程创建的。

为什么图案图标没有在设备上绘制的任何想法?

代码如下:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">

    <Button
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="New Button"
    android:id="@+id/button12"
    android:layout_gravity="center_horizontal" />
 </LinearLayout>

1 个答案:

答案 0 :(得分:0)

我假设图像是半透明的,您必须将内容窗格的bgTransparency设置为0,以便绘制表单背景。另外,请确保您没有将Form本身定义为透明。