I am developing application in BlackBerry and i am a newbie, so no idea how to implement.
In my application i have to implement tabs. For this i used pillButtonSet. In my application i have five tabs and each tab has complex view. I want to create different java class for different tabs.
As in Android we have TabActivity and we easily navigate between tabs. Still i have not designed the view for each tabs. I am googling but no success.
I am worried; do i need to write whole code on one screen? …. If not where do i have to create tabs and how to navigate?
Take a look at this BlackBerry example from RIM. It’s a bit old, but if you still have to support OS 5.0, it’s a useful technique (see bottom of answer if you don’t support OS 5.0).
From the description:
The page has sample code to download, but to protect against any possible link rot, here’s the most important part of the sample:
You said:
In your code, you can edit the methods named
displayTab1(),displayTab2(), etc. to return a different class for each tab. Following the example exactly, each class wouldextendtheVerticalFieldManagerclass. However, if your desired implementation isn’t well setup for aVerticalFieldManager, you could certainly change the return value of those methods to just be theManagerbase class, instead.Just remember to change the
tabAreamember variable if you do that:Note: if you only have to support OS 6.0 and above, you can also look into this newer API