07-20-2012 05:46 AM
Hi to all,
I want to implement three tabs in my app. I created three buttons for tab control but i cant design like this, Please help me how design.
Android developers use small rect tab image, arrow image and designed each tab as one view but i cant able to design above tab manager using buttons. Please help me.
07-20-2012 06:05 AM
If you are not very familar with creating BB UI components, then this might seem a challenge. But I think it can be done.
Let us start with the basics. Add three buttons to a HorizontalFieldManager. Add the HFM to the Banner area of a MainScreen (setBanner()). Now add a VerticalFieldManager, which we shall call _tabPane, to the MainScreen,
Now in the change listener for each of the Buttons, have code to delete all Fields from _tabPane, and then add a LabelField which tells you which Button has been hit..
Does this get you started?
07-20-2012 06:32 AM
Thank you peter, I understood but i struck with how to set image for buttons, if i get first tab image as a full arrow then i get empty space on the corner of the images
so that i cant place the second button image near to the first button. Please guide me how to get image for each tab from the designer. And place the images horizontally.
07-20-2012 06:48 AM
Thank you pp, I am using the Tab manager only but my problem is the button is like arrow, If the button is rectangle then i can place three buttons in Horizontal manager and when image is selected i change the onfocus image. But the real problem is placing the arrow images in horizontaly and their onfocus image.
07-23-2012 12:24 AM
07-23-2012 07:07 AM
Remember you are also going to need three different 'arrow' icons:
1) when the tab is in focus (so that it is focus color on the left of the 'arrow' and not focused color on the right)
2) when the next tab is in focus (so that it is focus color on the right of the 'arrow' and not focused color on the left)
3) when the neither this tab, nor the one next is in focus (so that it is not focused color on the right and left of the 'arrow')
07-24-2012 12:51 AM
Thank you peter and priyanka, i worked like what you instructed i almost did but i am getting issue on the arrows, when the first tab is in focus the right arrow tab3 also getting focus color, i cant able to set normal color to the rigth arrow, also when the tab is not focused the two tabs arrow is in focus color.
07-24-2012 12:59 AM
I worked on the Tabscontrol sample, I set Tabs image as background for the Horizontal Manager and replaced the tabs images when the focus is changed. I think i found the solution. Please suggest is this correct