开发者

How to change title of BlackBerry BrowserField when a certain link is clicked

I've been trying to find a way to add a 开发者_如何学Golistener to the BlackBerry BrowserField for when the user clicks a link and the URL changes. I have tried adding a BrowserFieldListener below, but I keep getting a warning message declaring that Document cannot be resolved as a type. Any suggestions on capturing when a user clicks a link and it takes them to a certain URL?

BrowserFieldListener listener = new BrowserFieldListener(){
public void documentLoaded(BrowserField browserField, Document document) throws Exception
    {

          browswerField.setTitle("Example");        
    }

};
browserField.addListener(listener);


Are you importing the declaration of Document somewhere?

I do something similar using the BrowserField to pars HTML, see my blog posting here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜