带占位符的 Codenameone FontImage
Codenameone FontImage with a placeholder
我想生成带有占位符的字体图像图标并将其设置为标签。有可能吗?.
您是指 URLImage 的占位符还是其他内容?
假设这就是您的意思,您可以使用 API toEncodedImage 将 FontImage
转换为可用作占位符的图像。
如果我明白你想要什么,我认为你必须使用 FontImage 来生成你的图像并应用遮罩使其变圆。
您不能将图像设置为标签的占位符,但可以在标签旁边添加图像(上、下、左或右)
Image img = FontImage.createFixed(...);
Label lbl = new Label("Some Text Here...",img);
lbl.setTextPosition(Component.[TOP/BOTTOM/LEFT/RIGHT]);
希望我能回答你的问题
我想生成带有占位符的字体图像图标并将其设置为标签。有可能吗?.
您是指 URLImage 的占位符还是其他内容?
假设这就是您的意思,您可以使用 API toEncodedImage 将 FontImage
转换为可用作占位符的图像。
如果我明白你想要什么,我认为你必须使用 FontImage 来生成你的图像并应用遮罩使其变圆。
您不能将图像设置为标签的占位符,但可以在标签旁边添加图像(上、下、左或右)
Image img = FontImage.createFixed(...);
Label lbl = new Label("Some Text Here...",img);
lbl.setTextPosition(Component.[TOP/BOTTOM/LEFT/RIGHT]);
希望我能回答你的问题