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
Highlighted
Contributor
Posts: 10
Registered: ‎04-27-2012
My Device: 9900
My Carrier: vodafone
Accepted Solution

Blackberry: Data not fully displayed in BB's Screen (version 5.0 Operating System/lower) tested on BB bold3

I developed an application and it works well on OS6 (Operating System 6 e.g. bold 5) but doesn't work well on OS5 (OS 5.0 or lower e.g. bold 3). The main problem is that I get data via JSON and displays multiple labels on the screen to show the data. Depending on the content received via json, data can be large but the main problem is that the vertical scroll doesn't allow the user to scroll down beyond a certain point. This makes me wonder if the screen in OS5 have limited contents allowed to be drawn on it. snippet code is shown below.

 

JSONArray json = new JSONArray(result);

for (int i = 0; i < json.length(); ++i) 
{
    JSONObject moleculevalue = json.getJSONObject(i);//get the json data object

    String tdescription = moleculevalue.getString("Total Description");


   if (tdescription == "") tdescription = "Not Applicable";              

   _fieldManagerMiddle.add(new SeparatorField());
   _fieldManagerMiddle.add(new LabelField("Description: " + tdescription, Field.FIELD_HCENTER));

}

 

 

Data still exist but users cannot scroll below the screen view.

Can anyone tell me a workaround for this and possibly reasons for this. Thanks in advance.

Contributor
Posts: 10
Registered: ‎04-27-2012
My Device: 9900
My Carrier: vodafone

Re: Blackberry: Data not fully displayed in BB's Screen (version 5.0 Operating System/lower) tested on BB bold3

Wow, so no one in BB World can help with this.
Developer
Posts: 141
Registered: ‎07-13-2011
My Device: BB Bold
My Carrier: Vodafone

Re: Blackberry: Data not fully displayed in BB's Screen (version 5.0 Operating System/lower) tested on BB bold3

Can you post the code for declaring  

_fieldManagerMiddle
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Blackberry: Data not fully displayed in BB's Screen (version 5.0 Operating System/lower) tested on BB bold3

[ Edited ]

No need to post any code at this time as I suspect the issue here is the lack of focusable fields.  LabelField by default is not focusable.  This can restrict scrolling especially on non touchscreen devices.  This is not an OS related issue, it is touchscreen verses non touchscreen. 

 

Two suggestions before you post code:

 

a) Make the LabelField focusable

_fieldManagerMiddle.add(new LabelField("Description: " + tdescription, Field.FIELD_HCENTER | LabelField.FOCUSABLE));

 

b) Add a NullField after the LabelField

 

Let us know how you get on with this.

Contributor
Posts: 10
Registered: ‎04-27-2012
My Device: 9900
My Carrier: vodafone

Re: Blackberry: Data not fully displayed in BB's Screen (version 5.0 Operating System/lower) tested on BB bold3

VerticalFieldManager _fieldManagerMiddle = new VerticalFieldManager(Manager.VERTICAL_SCROLL | VerticalFieldManager.FIELD_HCENTER);

 

The code for fieldmanagermiddle is shown above.

 

Thanks for your help.

 

 

Developer
Posts: 141
Registered: ‎07-13-2011
My Device: BB Bold
My Carrier: Vodafone

Re: Blackberry: Data not fully displayed in BB's Screen (version 5.0 Operating System/lower) tested on BB bold3

Have u tried  peter's idea

 

Try this code, Add FOCUSABLE

 

_fieldManagerMiddle.add(new LabelField("Description: " +tdescription, Field.FIELD_HCENTER|FOCUSABLE));

Contributor
Posts: 10
Registered: ‎04-27-2012
My Device: 9900
My Carrier: vodafone

Re: Blackberry: Data not fully displayed in BB's Screen (version 5.0 Operating System/lower) tested on BB bold3

Thanks peter_strange. That works fine. Any suggestion for solutions on this my other thread http://supportforums.blackberry.com/t5/Java-Development/Blackberry-KeywordFilterField-Search-UI-Impr... (thanks in advance)