11-06-2012 04:45 AM
I am new to BB development. I want to load a WebView inside my BB application without using the default device browser to load the URL. Following is the code I have used inside my BrowserScreen class which extends MainScreen.
BrowserField browserField = new BrowserField(myBrowserFieldConfig);
This will load the URL and display the web page without any error. Only issue is that web site is not developed specifically mobile devices. So the width of the web site is beyond the BB device screen. I can only scroll vertically not horizontally. How can I programmatically enable horizontal scrolling in BrowserField.
11-06-2012 05:29 AM
By default, you probably added the BrowserField into a VerticalFieldManager, in which case it, by default, restricts the width to the screen width. If you have just added your BrowserField to the MainScreen, then the same thing has happened.
I think you can get away with just changing the Manager you add this to to have horizontal scrolling.
Probably the easiest thing to do is to create a HorizontalFieldManager which will scroll horizontally. Add the BrowserField to this and then add this instead of adding the BrowserField to whatever you used to add the BrowserField too.
Let us know if this works.