10-29-2010 12:06 PM
Hi,
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();
config.setProperty(BrowserFieldConfig.VIEWPORT_WID
Display.getWidth()));
config.setProperty(BrowserFieldConfig.INITIAL_SCA
config.setProperty(BrowserFieldConfig.USER_SCALAB
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-29-2010 01:23 PM
In your case, I think you would want to just set the initial scale to 1.0 and your managers should give you the scrolling to original size.
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
Hi,
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 02:35 PM
From the different methods in BrowserFieldListener class, ONLY documentLoaded gets invoked. NO other method is invoked. Is there are solution to this?
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.
01-19-2011 03:48 PM
On the 9700 with OS 5.0, none of these listener methods get invoked:
1. downloadProgress,
2. documentError,
3. downloadAborted, and probably more.
Farah.
03-11-2011 12:06 PM
The link to the defect from mshaz is broken... what was the last status of that bug?
03-11-2011 04:53 PM