黑莓BrowserField白色空白页的问题 [英] Blackberry BrowserField white empty page issue

查看:193
本文介绍了黑莓BrowserField白色空白页的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我想显示BrowserField HTML内容。我用code blove要做到这一点,但我只看到白色的空白页。

Hi i want to show html content in BrowserField. I used the code blove to do this but i only see white empty page.

BrowserField demo = new BrowserField(); 
String res="<html><body><p>demo</p></body></html>"; 

demo.displayContent(res, "http://localhost");

有时,它正确地显示我的网页使用CSS字体,但有时不显示任何东西。

Sometimes it shows my page correctly with css fonts but sometimes it does not show anything.

问题是什么在我的code?

What is the problem in my code?

推荐答案

如果你看看<一个href=\"http://docs.blackberry.com/en/developers/deliverables/11958/Display_HTML_in_a_browser_field_825639_11.jsp\"相对=nofollow>在这个例子黑莓,

他们确保添加() BrowserField 其父管理​​ 之前调用 displayContent()

they make sure to add() the BrowserField to its parent Manager before calling displayContent().

我不知道,如果你只是忽略该行code,缩短你的问题,如果你错过调用添加()完全,或者,如果你把它的调用 displayContent()。但是,尝试在BlackBerry例子列出的顺序做,让我知道是否可行。

I don't know if you just omitted that line of code to shorten your question, if you're missing the call to add() entirely, or if you put it after the call to displayContent(). But, try doing it in the order listed in the BlackBerry example, and let me know if that works.

BrowserField demo = new BrowserField(); 
add(demo);
String res="<html><body><p>demo</p></body></html>"; 
demo.displayContent(res, "http://localhost");

这篇关于黑莓BrowserField白色空白页的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆