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
Posts: 19,621
Registered: ‎07-14-2008
My Device: Not Specified

Re: row column structure in blackberry application

I suspect you are swallowing all the navigationMovememt() in your ListField.  I suggest you call super.navigationMovement where the absolute value of dy is >= absolute value of dx, i.e. the use has moved the trackball more in the up and down direction than in the left/right direction.

 

Have you tried this on the Storm yet?

Developer
Posts: 330
Registered: ‎02-25-2009
My Device: Not Specified

Re: row column struture in blackberry application

nopes noy yet tried it on Storm.

 

here is how i am using navigationMovement

 

public boolean navigationMovement(int dx, int dy, int status, int time){
      
        if(dx<0){
            if(currentColumn!=0)
                    currentColumn--;
        }
        else if(dx>0){
            if(currentColumn<2)
                currentColumn++;
        }

}

 

sorry ,  i didnt get your solution

Developer
Posts: 19,621
Registered: ‎07-14-2008
My Device: Not Specified

Re: row column structure in blackberry application

Sorry, just coded this off the top of my head, may not even compile, but should show you what I mean.

 

public boolean navigationMovement(int dx, int dy, int status, int time){ if ( Math.abs(dx) > Math.abs(dy) ) { // User has scrolled left/right more than up/down, assume they want a horizontal movement if(dx<0){ if(currentColumn!=0) currentColumn--; } else if(dx>0){ if(currentColumn<2) currentColumn++; } return true; } else { return super.navigationMovement(dx, dy, status, time); } }

 

Developer
Posts: 330
Registered: ‎02-25-2009
My Device: Not Specified

Re: row column struture in blackberry application

hey peter_strange

 

Thank You very much .. it worked .. 

 

Thanks Thanks alot

 

 

Developer
Posts: 330
Registered: ‎02-25-2009
My Device: Not Specified

Re: row column struture in blackberry application

Hey there is one more problem

 

now consider i am at 3rd row and now if i press right key.. the focus goes to first line ..

 

i want the scene like .. even if m on 3rd or 4th row.. and i pressed right kew.. the columns should move and the row focus is yhere itself..

 

any solution??

Developer
Posts: 19,621
Registered: ‎07-14-2008
My Device: Not Specified

Re: row column struture in blackberry application

What is the 'Right' key?
Developer
Posts: 330
Registered: ‎02-25-2009
My Device: Not Specified

Re: row column struture in blackberry application

by Right, i mean if i see next next column .. move toward right..
Developer
Posts: 16,637
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: row column struture in blackberry application

overwrite navigationmovement, return true on horizontal movement and handle it yourself.
----------------------------------------------------------
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
Developer
Posts: 19,621
Registered: ‎07-14-2008
My Device: Not Specified

Re: row column struture in blackberry application

Simon - that is what he is doing.

 

spring_suvarna.  In your previous post you said

"now consider i am at 3rd row and now if i press right key.. the focus goes to first line .."

 

What is this right key you are pressing?

Developer
Posts: 330
Registered: ‎02-25-2009
My Device: Not Specified

Re: row column struture in blackberry application

on keyboard we have Right Left Up and down . ok?

 

now i press down key for three times.. so right now m at 3rd record .. fine?

now i press right key .. at this event the focus changes from 3rd record to first one. this should not happen. on press right key.. the columns should move in a way that peter_strange have told me.. which is running successfully ..