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: 770
Registered: ‎05-29-2012
My Device: see later

LinedGridFieldManager - Adding multiple rows on screen

to easy to do it,  LinedGridFieldManager ffm = new LinedGridFieldManager(2, 0);

 

And I add on each a picture.But how can I push the table to be in the middle.It starts from the right , and gives spaces at left.I want to make the table in the middle.

 

Developer
babakar
Posts: 770
Registered: ‎05-29-2012
My Device: see later

Re: LinedGridFieldManager - Adding multiple rows on screen

Not a biggie, here is what I did

u see in bitmapfield, i did to center.the question i have now..how can i detect which row/column did he click?

 

 

LinedGridFieldManager ffm = new LinedGridFieldManager(2, 100);
    	 
    	 for(int i = 0; i < v2.size(); i++)
         {
             byte[] directoryItem = (byte[])v2.elementAt(i); 
             EncodedImage image = EncodedImage.createEncodedImage(directoryItem,
                     0, directoryItem.length);    
             ffm.add(new BitmapField(image.getBitmap(),Field.FIELD_HCENTER
                     | Field.FIELD_VCENTER | Field.FOCUSABLE)
             {
            	 protected boolean navigationClick(int status, int time) 
                 {
                   // This is method will invoke when you click on your bitmapfield and you can write your piece of code here
            		 Dialog.inform("New Page "+status);
                   return true;
                  }
             });
             
         }