Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
abhay_401
Posts: 185
Registered: ‎09-02-2010
My Device: Not Specified
Accepted Solution

BrowserField2 Demo problem?

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 ?

Please use plain text.
Developer
Astarot82
Posts: 53
Registered: ‎10-29-2010
My Device: Not Specified

Re: BrowserField2 Demo problem?

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.

Please use plain text.
Developer
abhay_401
Posts: 185
Registered: ‎09-02-2010
My Device: Not Specified

Re: BrowserField2 Demo problem?

Hi 

 

 

 

Please use plain text.
Developer
Astarot82
Posts: 53
Registered: ‎10-29-2010
My Device: Not Specified

Re: BrowserField2 Demo problem?

I would recommend adding the browserfield container AFTER the controls and use this browserField2 method:

 

  void setZoomScale(float scale)

 

Please use plain text.
Developer
abhay_401
Posts: 185
Registered: ‎09-02-2010
My Device: Not Specified

Re: BrowserField2 Demo problem?

 


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/ForgotPassword.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?

 

Please use plain text.
Developer
abhay_401
Posts: 185
Registered: ‎09-02-2010
My Device: Not Specified

Re: BrowserField2 Demo problem?

any help please...?

Please use plain text.
Developer
Astarot82
Posts: 53
Registered: ‎10-29-2010
My Device: Not Specified

Re: BrowserField2 Demo problem?

The zoom is too High..., start with 1.0.

 

what is not working?

Please use plain text.
Contributor
maryemsiddiqui
Posts: 17
Registered: ‎03-03-2011
My Device: 9800

Re: BrowserField2 Demo problem?

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

 

Please use plain text.
Developer
Astarot82
Posts: 53
Registered: ‎10-29-2010
My Device: Not Specified

Re: BrowserField2 Demo problem?

is local a valid scheme? I think if you need to use a local file then you should use the file scheme.

Please use plain text.
Developer
peter_strange
Posts: 19,599
Registered: ‎07-14-2008
My Device: Not Specified

Re: BrowserField2 Demo problem?

@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.

Please use plain text.