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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
nikita18
Posts: 144
Registered: ‎08-18-2012
My Carrier: Vodafone
Accepted Solution

Scroll vertically down 10 times programmatically..

I have a requirement to vertically scroll down 10 times programmatically from my app. Can anybody help me doing this. Thanks.

Please use plain text.
Developer
simon_hain
Posts: 13,754
Registered: ‎07-29-2008
My Carrier: O2 Germany

Re: Scroll vertically down 10 times programmatically..

input simulation / event injection?
if setVerticalScroll does not do what you want, at least.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
nikita18
Posts: 144
Registered: ‎08-18-2012
My Carrier: Vodafone

yes i want to inject key press for scrolling 10 times in...

[ Edited ]

yes i want to inject key press for scrolling 10 times in blackberry. Can we do this? Please show me how. Thanks.

Please use plain text.
Developer
peter_strange
Posts: 17,630
Registered: ‎07-14-2008

Re: yes i want to inject key press for scrolling 10 times in...

This seems a bit vague, 10 times what?  10 screens?  10 swipes of the trackpad?

 

If this is your applicatino how about setVerticalScroll?

Please use plain text.
Developer
nikita18
Posts: 144
Registered: ‎08-18-2012
My Carrier: Vodafone

Re: Scroll vertically down 10 times programmatically..

[ Edited ]

I want 10 swipes of the trackpad and this is not my application. I have this requirement. I got to know that we can enject Key presses programmatically. How can we do this for 10 swipes of the trackpad? Thanks a lot.

Please use plain text.
Developer
simon_hain
Posts: 13,754
Registered: ‎07-29-2008
My Carrier: O2 Germany

Re: Scroll vertically down 10 times programmatically..

http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/EventInjector.Navigatio...
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
maadani
Posts: 729
Registered: ‎05-04-2011

Re: Scroll vertically down 10 times programmatically..

You can try and add a NullField and set focus to it.

 

E.

Please use plain text.
Developer
nikita18
Posts: 144
Registered: ‎08-18-2012
My Carrier: Vodafone

Re: Scroll vertically down 10 times programmatically..

[ Edited ]


Ok thanks a lot for your reply simon, will try and then tell you. 

Please use plain text.
Developer
nikita18
Posts: 144
Registered: ‎08-18-2012
My Carrier: Vodafone

Re: Scroll vertically down 10 times programmatically..

I got it with the code below:

 

for(int i=0;i<10;i++)
    		 EventInjector.invokeEvent(new EventInjector.TrackwheelEvent(EventInjector.TrackwheelEvent.THUMB_ROLL_DOWN,1,KeypadListener.STATUS_ALT));

 

 

Thanks a lot everyone. 

Please use plain text.