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
New Contributor
hennasingh
Posts: 8
Registered: ‎05-01-2012
My Device: Blackberry 8520
My Carrier: Blackberry

Overlapping Fields

Hello All, Greetings..!!

 

I am new to blackberry app development. I am trying to make an app where in i have a picture scroller , the functionality i want to add is that when we click on a picture scroller image, the image should appear highlighted or little raised from rest of the images, but i am not able to do it.

In picture scroller, by default center image appears highlighted. If i overlap picture scroller with another image that remains fixed in such a way that as and when images from scroller crosses that fixed image it appears raised.

 

Could you please help how do i give this functionality, i am not able to implement it.

 

Thanks & Regards

 

henna singh

 

Please use plain text.
Developer
rabiray
Posts: 141
Registered: ‎07-13-2011
My Device: BB Bold
My Carrier: Vodafone

Re: Overlapping Fields

Hi Henna

 

Try this solution

 

Add listner to picture scroll field

_pictureScrollField.setChangeListener(this);

 

 

Implement navigation click method

----------------------------------------------------

protected boolean navigationClick(int status, int time)
{
if(_pictureScrollField.isFocus())
{
_pictureScrollField.setHighlightStyle(HighlightStyle.SQUARE_BORDER);

return true;
}

return super.navigationClick(status, time);
}

 

 

implement FieldChanged method

----------------------------------------------------

if(field instanceof PictureScrollField){

 _pictureScrollField.setHighlightStyle(HighlightStyle.NO_HIGHLIGHT);

}

 

 

Hope this helps....

 

 

 

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

Re: Overlapping Fields

Welcome to the forums.

 

Sorry I do not actually understand what you are asking for.  Can you give us a screen shot showing something similar.

Please use plain text.
New Contributor
hennasingh
Posts: 8
Registered: ‎05-01-2012
My Device: Blackberry 8520
My Carrier: Blackberry

Re: Overlapping Fields

Hi rabiray,

 

thanks for the quick reply. i will try implement it.

 

i will show what i want.

 

http://www.google.co.in/imgres?hl=en&gbv=2&biw=1280&bih=667&tbm=isch&tbnid=EJHfBywhZ9KFZM:&imgrefurl...

 

The image that is clicked to be little raised than the rest

 

Thanks

Please use plain text.
Developer
rabiray
Posts: 141
Registered: ‎07-13-2011
My Device: BB Bold
My Carrier: Vodafone

Re: Overlapping Fields

Hi Heena,

 

As per my solution is concerned..this will put a red border around the selected image.

 

No idea as per now how to raise this.....

 

Cheers

Rabi Ray

 

 

 

Please use plain text.
New Contributor
hennasingh
Posts: 8
Registered: ‎05-01-2012
My Device: Blackberry 8520
My Carrier: Blackberry

Re: Overlapping Fields

Hi,

 

thanks.

 

this is what i want

 

the selected image in the scroller to be raised

 

i hope you understood now

 

http://www.google.co.in/imgres?hl=en&gbv=2&biw=1280&bih=667&tbm=isch&tbnid=EJHfBywhZ9KFZM:&imgrefurl...

Please use plain text.
New Contributor
hennasingh
Posts: 8
Registered: ‎05-01-2012
My Device: Blackberry 8520
My Carrier: Blackberry

Re: Overlapping Fields

hi rabi,

 

could the fields be overlapped, i mean

1. i have this particular square image filled with white color, and i placed it in the center, keeping it fixed

2. i have this picture scroll a little below  that  fixed image such that it overlaps that fixed image, and when we scroll the images included in the scroll overlaps on it and it appears raised.

 

i hope u understood what am saying.

 

Thanks 

henna

Please use plain text.
Developer
rabiray
Posts: 141
Registered: ‎07-13-2011
My Device: BB Bold
My Carrier: Vodafone

Re: Overlapping Fields

Hi

 

Not sure if we can place a fixed image inside picture scrol.....

 

Have tried diffrent styles available in 

PictureScrollField.HighlightStyle

 

like ILLUMINATE_WITH_SQUARE_BORDER etc....

 

Cheers

Rabi

Please use plain text.
New Contributor
hennasingh
Posts: 8
Registered: ‎05-01-2012
My Device: Blackberry 8520
My Carrier: Blackberry

Re: Overlapping Fields

hey rabi,

i wont place a fixed image inside picture scroll,

 

but the picture scroll will overlap over the fixed image..

 

i hope you got it now.

 

i have tried applying diferent styles, it dint help.

Please use plain text.
Developer
rabiray
Posts: 141
Registered: ‎07-13-2011
My Device: BB Bold
My Carrier: Vodafone

Re: Overlapping Fields

Hi Heena

 

I dont think it is so simple to implement...i dont know how to fix one image and overlap another field onto it.

I think it is best to implement your own custom class and draw accordingly.

 

Thanks

Rabi Ray

Please use plain text.