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
Posts: 571
Registered: ‎04-11-2009
My Device: BB 10 Dev Alpha

Re: ListField Issue

[ Edited ]

Yes, you can use HorizontalFieldManager, Manager too.

 

Edit : http://supportforums.blackberry.com/t5/Java-Development/How-to-Extend-Manager/ta-p/446749

Regards,
Kanak Sony
------------------------------------------------------------------------------------------
http://dodevelopnshare.wordpress.com/ | http://www.linkedin.com/profile/view?id=188131481&trk=tab_pro
Developer
Posts: 255
Registered: ‎05-03-2012
My Device: 9930
My Carrier: Vodafone

Re: ListField Issue

[ Edited ]

Does it affect UI speed? And is it right to add this manager in drawListRow method?

Developer
Posts: 571
Registered: ‎04-11-2009
My Device: BB 10 Dev Alpha

Re: ListField Issue

There will be no need of ListField Implementation once you will have your custom manager (widget) get cooked....  You will have an array of items which you need to show, and then just add that number of widgets to your screen manager.  

 

Post a snapshot of your requirement of list to be required.

Regards,
Kanak Sony
------------------------------------------------------------------------------------------
http://dodevelopnshare.wordpress.com/ | http://www.linkedin.com/profile/view?id=188131481&trk=tab_pro
Developer
Posts: 255
Registered: ‎05-03-2012
My Device: 9930
My Carrier: Vodafone

Re: ListField Issue

Can you give some sample In which i want to diplay Strings with variable Length like a list?
Developer
Posts: 255
Registered: ‎05-03-2012
My Device: 9930
My Carrier: Vodafone

Re: ListField Issue

If i want to display parsed data in this case..is it possible ?
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: ListField Issue

Everything you want to do is possible, but you have to put some effort in to it.  The best way to do what you appear to want (assuming I am understanding you correctly) would be to create your own Field. 

 

Here is a KB article to help.  You will find further help if you search the forum - look for "custom field". 

 

http://supportforums.blackberry.com/t5/Java-Development/Create-custom-fields/ta-p/444962

 

While not specifically targeting your requirement, I recommend that review these samples.  They demonstrate some well written custom Fields, that should provide you with an understanding of how to do things like you want. 

 

http://supportforums.blackberry.com/t5/Java-Development/Implement-advanced-buttons-fields-and-manage...

 

So have a go at creating something, do it step at a time, and slowly create the Field you want.  If one of your small steps causes you problems, then paste a small snippet of code up for us to look at. 

 

Good luck. 

Developer
Posts: 255
Registered: ‎05-03-2012
My Device: 9930
My Carrier: Vodafone

Re: ListField Issue

Following code i am using :

_text is a array of String. n is size of array.

 

for (int i = 0; i < n; ++i)

{
graphics.drawText(_texts[i],0,5,graphics.ELLIPSIS);
}

If i use above code,_text contents get overlap.

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

Re: ListField Issue

I would have thought if you didn't want them to overlap, you would increase the 'y' position for the drawText.  You have it fixed at 5. 

Developer
Posts: 255
Registered: ‎05-03-2012
My Device: 9930
My Carrier: Vodafone

Re: ListField Issue

how should i increase it?
Developer
Posts: 255
Registered: ‎05-03-2012
My Device: 9930
My Carrier: Vodafone

Re: ListField Issue

I am unable to display variable height Smiley Sad
gere is the code :
protected void layout(int arg0, int arg1)
{
int height;
height = strShowTimes.length/4;
if(height%4 > 0)
height++;
height = height * 20;
int _fieldWidth = Display.getWidth();
setExtent(_fieldWidth, height);
}