03-14-2011 09:59 AM
Hi,
I have imported BrowserFieldDemo2 from BlackBerry samples into my eclipse. If i open any wesite through BrowserField. I can be able to scroll vertically the webpage but i am unable to scroll horizontally.
I want to see the whole webpage. What may be the problem ?
Solved! Go to Solution.
03-14-2011 12:44 PM
The browserfield is a VerticalFieldManager, so it takes the width of what it will display but it can be scrolled down.
Put it inside of a HorizontalFieldManager and play a little with the style. For me this works: Field.FOCUSABLE | Manager.VERTICAL_SCROLL | Field.FIELD_HCENTER | Manager.TOPMOST.
03-15-2011 02:38 AM
Hi Astarot82,
Thanks for ur reply, i did as u told it's working fine now. Thanks alot.
But how can we add Zoom In and Zoom Out controls to that web page...?
03-15-2011 03:12 AM
I would recommend adding the browserfield container AFTER the controls and use this browserField2 method:
void
setZoomScale(float scale)
03-15-2011 03:27 AM
public webviewScreen()
{
super(USE_ALL_HEIGHT | USE_ALL_WIDTH | Manager.HORIZONTAL_SCROLL | Manager.VERTICAL_SCROLL);
if (CoverageInfo.isOutOfCoverage())
{
UiApplication.getUiApplication().invokeLater(new Runnable()
{
public void run()
{
Dialog.alert("You need an active internet connection to use this application");
System.exit(0);
}
});
}
else
{
float f=20.00f;
BrowserField myBrowserField = new BrowserField();
myBrowserField.setZoomScale((F));
// myBrowserField.requestContent("http://beemediahive.sitesystems.ca/Login/ForgotPas sword.aspx");
myBrowserField.requestContent("http://hive.beemedia.com/Login/terms.aspx");
myBrowserField.setScrollListener(this);
add(myBrowserField);
}
}
Hi,
I used but not working... where i am doing mistake here...? Can u help me please?
03-15-2011 05:37 AM
any help please...?
03-15-2011 02:05 PM
The zoom is too High..., start with 1.0.
what is not working?
03-29-2011 02:30 AM
hello.
I'm using browserfield2demo sample. The problem is when I change BrowserFieldRequest("local:///index.html") to any other site it get crash (got JVM error 104 uncaught illlegal state exceptional error) and my simulator terminate. So kindly guide me how to resolve this problem. I'll be very thankfull to you.
Thanks
03-29-2011 01:49 PM
is local a valid scheme? I think if you need to use a local file then you should use the file scheme.
03-29-2011 05:58 PM
@Astarot82 - local is valid. For BrowserField 2 anyway.
@maryemsiddiqui
Can you clarify some things.
Are you running the standard BrowserField Demo? Is it failing with an IllegalStateException?
If so, can you tell us what your environment is (OS, Eclipse level, JRE level etc,) so that we can recreate it?
if you are not running the standard demo, can you show us what you have changed, again so we can recreate this.