Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to move added image horizontally in both directions i.e(right to left and left to right) in blackberry. plz help me out for this
Posted
Comments
TorstenH. 10-Oct-12 4:14am    
why do you want to move an image horizontal? what should happen with the picture afterwards?
I guess there's a bigger story behind this.
AmanArora2012 10-Oct-12 5:04am    
i want to make a game this is required in it
AmanArora2012 10-Oct-12 5:06am    
something like brick breaker game i.e already available in Blackberry App

1 solution

You need to react on the event of pressing a key.
net.rim.device.api.ui.component.ButtonField[^] has a method for keyUp event[] for this.

On that event you need to place the image some pixels to the corresponding side and update the view.

But as always take one step at a time:
- first try to display the image
- try to place image at different places
- try to react on button
- set image to new place on button event
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900