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
DAquilina
Posts: 587
Registered: ‎01-19-2010
My Device: BOLD 9700 OS5.0.0.x on Rogers Canada
My Carrier: Rogers

Re: Wallpaper for my App

Hmm... Making it so the user cannot manually move to the bottom row. Disable the vertical scrolling while the cursor is in the top row, and move the cursor down to the second row, storing the index of the selected car, upon a click of the trackball/trackpad. Again, not a perfect solution, but I believe it may suit your purposes. The other possibility is something like the following:

 

 

pseudo code:

onFocus (sender, event)
{
  if (VFM.index != 0)
  {
    fromBottom == true;
  }
  
  if (HFM.index == 4 && fromBottom)
  {
    setSelectedIndex (_index);
    fromBottom = false;
  }
  
  if (!fromBottom)
  {
    _index = HFM.index;
  }
}

 

 

Hope that helps,

~Dom

----------------------------------------------------------------------------
chown -R us ./base
~J!NX
Please use plain text.
Developer
SivaR
Posts: 75
Registered: ‎02-08-2010
My Device: 9000
My Carrier: Airtel

Re: Wallpaper for my App

Hi Dom

I understand what you are trying to help me, but I found that code flow is little different and the solution is not working

 

i.e.

When I was on first ROW (any one of the Icon) and press DOWN Key, I am storing the current highlight icon.

But when I move from bottom ROW to top ROW, I should get only one FOCUS GAINED event on listener, but I am getting TWO FOCUS GAINED events, first one with stored icon (Field) and second with last icon (Field)

 

So even if we store the value and setting it to FOCUS, because of this second FOCUS GAINED event, it is going back to last icon

 

Hope I made clear of what I am trying to say. Let me know if you have any questions.

 

Thanks
Siva
Please use plain text.
Developer
jd15
Posts: 111
Registered: ‎10-01-2009
My Device: Not Specified

Re: Wallpaper for my App

Not that this is necessarily helpful, but this sounds like the same issue I have been having and i have seen a ton of times on this board.  But usually its a tab field manager -- you have multiple tabs at the top of the manager, and depending on which you click, different content is displayed beneath. you can go down into the content directly from any of the tabs, but always when you go back up it goes to the last tab (right-most) on the tab field instead of the last tab that was selected.

i think some people have gotten a work around for this but i havent been able to myself.  try searching for something like "tab field" or "tab list" and you should come up with some relevant posts.

Please use plain text.
Developer
SivaR
Posts: 75
Registered: ‎02-08-2010
My Device: 9000
My Carrier: Airtel

Re: Wallpaper for my App

Appreciate for your responses.... Will look into board or KB as suggested...

Thanks
Siva
Please use plain text.
Developer
DAquilina
Posts: 587
Registered: ‎01-19-2010
My Device: BOLD 9700 OS5.0.0.x on Rogers Canada
My Carrier: Rogers

Re: Wallpaper for my App

I understand what you're saying, but that's why I'm thinking you can't use FOCUS_GAINED as the determining criteria. It's better to consume the down key press and only change to the second row if the user clicks the trackpad to select a vehicle. That way you ensure that the correct vehicle will only be stored when the user is sure that this is hte car they want to use, and you will never store the index upon returning to the top row. The code I listed above was merely speculatory in the case that you REALLY didn't want to do this, and furthermore used various flags to account for situations in which the FOCUS_GAINED events did not fit the criteria you want.

 

~Dom

----------------------------------------------------------------------------
chown -R us ./base
~J!NX
Please use plain text.