0

我正在以 midp 形式创建 ImageItem,但是,当文本换行到下一行时,图像将移到顶部并且文本出现在新行中。任何想法如何避免这种情况?

例子:

*Image*
this is a a test, hello
world, this is a test

我需要它是这样的:

*Image* this is a test,
hello word, this is a test 

或者

         this is a test, hello
*Image*  world, this is a test
         hello world

我的方法:

protected Item createItemWithIcon(String str, Image icon)
{
    Item item = null;
        item = new ImageItem(str, icon, Item.LAYOUT_VCENTER, "", Item.HYPERLINK);
        form.append(item);
    return item;
}
4

1 回答 1

0

正如@sajid 已经说过Canvas 是一种选择,如果您想将某些特定文本与图像相关联,另一种选择是CustomItem。然而,在一般情况下,没有办法让文本在 Image 周围流动。查看本文以获取有关表单和布局中 ImageItem 的一些详细信息

于 2011-06-14T10:49:47.737 回答