08-01-2013 02:42 AM
I have seen a functionality in android and i want to add the same functionality in blackberry also.
when i click on the menu button a screen will open and it contains an image on it when i swipe the image i get another image and a constant image on it and again if i swipe that image i get another image bt the constant image remains same.
SO can we do it in Blackberry?
08-01-2013 04:26 AM
What you are trying to do is slide part of a screen.
Have a look at the PictureScrollField for a built in field that does something similar.
There is, as far as I am aware, not 'Field' that does what you can do with the whole 'screen' on Android and iPhone, so you have to implement this yourself using a HorizontalFieldManager. This is not trivial, and complicated by the various different screen sizes you will have to cope with, plus the use of the trackpad for scrolling.
But there are a number of Threads with sample code to help you create something like this. So have a look round the forum.
Be prepared for a lot of work....
08-01-2013 04:41 AM
Hi Thanks for the reply...
Actually i want to slide the whole screen.
Like there will be 4 images.
When i click first time i get image 1 and its a background image and when i swipe 1st image i will get 2nd image thats to act as a background image but it contains the constant image on the background image and if i slide the 2nd image again i will get a 3rd image thats aloso the background image and contains the same constant image on it.
So i have to work on the whole screen.??
08-01-2013 05:03 AM
I don't understand what you mean by a constant image in this comment:
"when i swipe 1st image i will get 2nd image thats to act as a background image but it contains the constant image on the background image"
If you want to slide 'everything' on the screen, then you can use Screen transitions. If you want something to be 'constant', by which I assumed you meant fixed (not sliding), then you can not use screen transitions.
If you re-read, review carefully and spell check your posts, they will make more sense to other people. I get the impression sometimes that you have written your posts as fast as you can, in the hope of catching people quickly. In my experience, spending more time giving accurate descriptions, good examples, and correct English (grammar and spelling) will improve the responses you get.
Some other thoughts on getting good responses are summarised here:
08-01-2013 05:14 AM
Ok i am sorry .
I will explain my question in more detail..
See i have a menu say view
menu -> click
When i click on this menu i get a screen say screen1.
Screen1 contains an image i.e background image when i swipe it i get another background image and an image on top of the background image say image1.
When i slide the Screen1 , then the screen gets slide along with the image1 on new Screen say Screen2
Similarly on Screen3 but the image1 gets along with all the screens. Thats why i said that image as constant.
SO its possible to do so in blackberry?
08-01-2013 06:00 AM
I'm sorry this is still not clear to me.
On Screen 1, I have a background image, let us say of a cat. I have a foreground image, let us say it is a dog.
We then swipe to go to Screen 2.
On Screen 2 we have 2 images, a background image and a foreground image. I think you want the background image to be the same, so it is still a cat. The foreground image changes, say to being a horse.
Is this correct so far?
Now when changing from Screen 1 to Screen 2 do you want:
i) the cat to remain in one place, and the dog to slide out to be replaced by the horse? Or
ii) will the screen with the dog and the cat slide out together to be replaced by a new screen with a horse and cat.
(ii) is possible with Screen transitions, If you want (i), then you need to create your own code.
08-01-2013 06:14 AM
Sir i want that the background image get changed and the foreground image remain same.
When we slide the screen then only the screen and background image get change while the foregound image remains as it is.
Suppose on screen1 i have a background image that has grass on it and on foreground image i have a cat so the position of cat is adjusted in such a way that it appears the cat is eating it.
And same on the next page we agr having a background image of a rat so this time cat is eating the rat.
08-01-2013 06:29 AM
"Suppose on screen1 i have a background image that has grass on it and on foreground image i have a cat so the position of cat is adjusted in such a way that it appears the cat is eating it.
And same on the next page we agr having a background image of a rat so this time cat is eating the rat."
In this case, if you slide both the cat and grass out together and slide in the cat and rat together, then you can do this with screen transitions. The entire screen will slide, including any header and footer (I don't think you will have a header or footer, I am just clarifying my point).
If you want the cat to remain in the same place on the screen while the sliding is taking place, and so just slide the grass out and the rat in, then you will need to write this yourself.
Which is it to be?
Finally, I have said this before but it obviously has not stuck.
Can you use the spell checker before posting anything. And re-read to make sure it makes sense. Please.