开发者

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

开发者 https://www.devze.com 2023-04-13 00:39 出处:网络
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, bu

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

精彩评论

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

关注公众号