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  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Genuine OEM Dell Ink Cartridge Color Black 7Y745 7Y743 Lot Of 4 +
$39.0
Genuine OEM Dell Ink Cartridge Color Black 7Y745 7Y743 Lot Of 4 + pictureDELL 725-BBBQ Lamp manufactured by DELL
$166.71
DELL 725-BBBQ Lamp manufactured by DELL pictureDell OEM 5100 series 4 Color Toner Set CMYK, GG577, GG578, GG579, HG308 - New
$179.99
Dell OEM 5100 series 4 Color Toner Set CMYK, GG577, GG578, GG579, HG308 - New pictureOEM Dell KU705 nVidia Quadro FX5500 1GB GDDR2 PCI-e Graphics Card
$99.95
OEM Dell KU705 nVidia Quadro FX5500 1GB GDDR2 PCI-e Graphics Card pictureUSSP OEM GENUINE DELL Power Supply PSU NPS-420AB E 420W POWEREDGE
$19.89
USSP OEM GENUINE DELL Power Supply PSU NPS-420AB E 420W POWEREDGE picture






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