BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 02-22-2009, 09:21 PM   #1 (permalink)
New Member
 
Join Date: Feb 2009
Model: 8320
PIN: N/A
Carrier: china mobile
Posts: 9
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How to implement a link field

Please Login to Remove!

In the blackberry browser , you open a web page,when you navigation a hyperlink element, you can click the link to open a new page, or open the browser menu ,click the Get Link menu to open the page. now I want implement a custome Field just like this.

I can extends net.rim.device.api.ui.Field to implement a LinkField, or there is any chance to use the field that the browser used. In the api docs I can not find how the browser render the html url link.

any suggestion. thanks!
Offline  
Old 02-22-2009, 09:51 PM   #2 (permalink)
New Member
 
Join Date: Feb 2009
Model: 8320
PIN: N/A
Carrier: china mobile
Posts: 9
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I searched the forum. and found a post:
www .blackberryforums .com/developer-forum/172635-how-do-i-include-web-link.html
It seems can use ActiveRichTextField , when the text match the certen StringPattern.



add(new RichTextField("A phone number to call in the U.S.",Field.NON_FOCUSABLE));
add(new ActiveRichTextField("1-800-555-1212",Field.FOCUSABLE));
add(new RichTextField("An Email Address to use.",Field.NON_FOCUSABLE));
add(new ActiveRichTextField("support@rim.com",Field.FOCUSA BLE));


use

add(new ActiveRichTextField("www .google .com",Field.FOCUSABLE));

to get the url page. but I want the rendering text is Google not the www .google .com , so how to do that.

I remove the http protocol text because the post limit: To be able to post links or images your post count must be 10 or greater.
Offline  




Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.