10-29-2010 12:06 PM
I'm developing an application(for 5.0 version) to display a webpage in a browserfield i have successfully display it but it takes the webpage fit to the screen so it seems like compressed. I need to display the webpage with actual width and height of the webpage....Currently i'm adding browserfield to the vertical manager and give vertical scroll for that manager.. Now i want to display the web page as its original width and height...
Got my point? if no please free to ask..
Can any one explain me how to display the webpage in actual width and height in the browerfield
Solved! Go to Solution.
10-29-2010 01:22 PM
The following code snippet shows how to set the width of the viewport you would like, and the initial scale value ...
config = new BrowserFieldConfig();
browserField = new BrowserField(config);
The USER_SCALABLE prevents the user from changing the zoom. You may or may not want that depending on your code.
VIEWPORT_WIDTH sets the width that you wish to view it at. In our applciation, we limit the width to the screen and don't allow scaling.
10-30-2010 01:11 AM
Thanks for your quick reply ronrad now its work and one more question how to show progress or loading in browserfield...
Thanks once again.. i will make this thread as solved once you reply this thread...
11-01-2010 01:19 PM
For progress, please look through the following:
Create a class that implements BrowserFieldListener, and then do a BrowserField.addListener(newClass);
You will receive progress callbacks on the listener class.
01-19-2011 03:21 PM - edited 01-19-2011 03:22 PM
farahhanif, what device(s) are you seeing this problem with BrowserFieldListener?
On the Torch 9800, the documentUnloading() method in BrowserFieldListener is never called. Works fine on 5.0 devices so it looks like something was broken. I have opened a defect for this using the RIM Bug Tracker back in October but have not seen any movement on it.
03-11-2011 04:53 PM