How to open link in webview in Blackberry like iP开发者_如何学Chone and Android ?
Which should not be open in Browser ,it should be opening in Webview through application .
The Blackberry equivalent of a WebView is a BrowserField. Example code from this page:
import net.rim.device.api.browser.field2.*;
import net.rim.device.api.ui.*;
import net.rim.device.api.ui.container.*;
public class BrowserFieldDemo extends UiApplication
{
public static void main(String[] args)
{
BrowserFieldDemo app = new BrowserFieldDemo();
app.enterEventDispatcher();
}
public BrowserFieldDemo()
{
pushScreen(new BrowserFieldDemoScreen());
}
}
class BrowserFieldDemoScreen extends MainScreen
{
public BrowserFieldDemoScreen()
{
BrowserFieldConfig myBrowserFieldConfig = new BrowserFieldConfig();
myBrowserFieldConfig.setProperty(BrowserFieldConfig.NAVIGATION_MODE,BrowserFieldConfig.NAVIGATION_MODE_POINTER);
BrowserField browserField = new BrowserField(myBrowserFieldConfig);
add(browserField);
browserField.requestContent("http://www.blackberry.com");
}
}
Options Icon -> Host Routing Tables -> Register Now
If the above instructions failed, try stepping through these instructions one by one
* Try getting your service books retransmitted.
a. Login to your BlackBerry Web Client (BWC/BIS) site.
b. Click "Profiles" (At the top of your BWC webpage via your PC)
c. Click "Send Internet Browser Service Book"
* Try rebooting your BlackBerry by removing and reinserting battery.
* Make sure you are running BlackBerryOS 4.0 by checking:
Check Options -> About
If you are not running at least Version 4.0, you need to download and install BlackBerryOS 4.0 then repeating all the above instructions again.
* If that does not work, and you are on a BlackBerry Enterprise Server (BES), try re-activating your BlackBerry on BES. This may be as simple as connecting your BlackBerry to your PC and synchronizing your BlackBerry while Outlook is in ONLINE mode.
I think that you are looking for the BrowserField UI component.
精彩评论