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
babakar
Posts: 696
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

HorizontalfieldManager scrolling

 HorizontalFieldManager hManager6 = new HorizontalFieldManager(Field.USE_ALL_WIDTH | Manager.HORIZONTAL_SCROLLBAR | Manager.HORIZONTAL_SCROLL | FIELD_VCENTER | FOCUSABLE )
     {
         protected void sublayout(int maxWidth, int maxHeight) {
             setExtent(maxWidth, maxHeight);
             super.sublayout(maxWidth, maxHeight);
         }
     };

 

 

 

As you see I have flash signs on the sides that horizontalfieldmanager is scrollable..

is there other designs? the flash button is too small.

 

 

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

Re: HorizontalfieldManager scrolling

I thought you had asked this question before and arkadyz had provided you with an answer:

http://supportforums.blackberry.com/t5/Java-Development/HorizontalfieldManager-scrolling/m-p/2044397

 

One other thing, this code will not do what you want it to do:

         protected void sublayout(int maxWidth, int maxHeight) {
             setExtent(maxWidth, maxHeight);
             super.sublayout(maxWidth, maxHeight);
         }

 

The

super.sublayout(maxWidth, maxHeight);

will have its own setExtent and so ignore your one.  I would remove your sublayout code and leave the default processing to do its job. 

Please use plain text.
Developer
babakar
Posts: 696
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Re: HorizontalfieldManager scrolling

yeh i did. unfortunately as i said before i deal with a tough boss.

 

 

he wants to have like iphone, page control. those white dots  ( http://www.edumobile.org/iphone/wp-content/uploads/2010/02/imgmax.png )

 

I dont know how to implement that in blackberry, the white dots on the horizontal scroll.

 

 

This is why I am trying to figure out ways so that he will be ok with my job...

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

Re: HorizontalfieldManager scrolling

That is a different requirement.

 

I presume each 'dot' is an entity and you indicate the currently displayed entity by a different colored dot.  So if there are 5 things that you can scroll to, and you are looking at the 4th one, the 4th dot will be a different color. 

 

This is painful on the Blackberry not least because the screens have different widths.  And there is no way to easily centralize the 'entity'. 

 

Anyway, what are the 'entities' you are trying to display?  Bitmaps?  Will they be sized for the Screen width and height? 

 

Have you thought about hiring a more experienced BB programmer, like arkadyz?

Please use plain text.
Developer
babakar
Posts: 696
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Re: HorizontalfieldManager scrolling

no.. but its long story here.
if u deal with peole in gulf, u would somewhat understand.
just coz i am java developer, then i can do android or blackberry to him.

my scroll is 10 pictures, i have 2 of them showing... on scrooll..the 2nd and 3rd shows..on another scroll 3rd and 4th ..on scroll to left 2nd and 3rd..and so on.
Please use plain text.
Developer
peter_strange
Posts: 19,599
Registered: ‎07-14-2008
My Device: Not Specified

Re: HorizontalfieldManager scrolling

Can you define exactly how it should work?  Also have you thought about different screen sizes?

Please use plain text.
Developer
babakar
Posts: 696
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Re: HorizontalfieldManager scrolling

I AM trying different things then dots.

 

is there in blackberry a way to create gallery with 2 pics scrollable? or sthg like that?

 

I use bitmapfield, arranged in horizontalfieldmanager now.

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

Re: HorizontalfieldManager scrolling

PictureScrollField?

Please use plain text.
Developer
arkadyz
Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: HorizontalfieldManager scrolling

Well, I second Peter's suggestion to take a look at PictureScrollField. It is a nice native image gallery gadget. Try using it first and see whether it pleases your boss. You can fine-tune it with style bits, so try various set ups first.

 

If it doesn't, you can have something simple still with a HorizontalFieldManager, scrollable and modified to have a "gravity" scrolling (with stops at the exact image boundaries) - something you create programmatically. If you end up having to do that, come here again with the exact specs and we'll give you some implementation ideas.

 

Good luck!

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
Please use plain text.