BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 08-21-2009, 10:22 AM   #1 (permalink)
New Member
 
newbie_bb's Avatar
 
Join Date: Aug 2009
Model: 8300
PIN: N/A
Carrier: simulator
Posts: 9
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default cosmetic changes in tab implementation by Horizontal manager

Please Login to Remove!

Hi,

I made a tab using horizontalManager. I want To change the background and text color and font of tab on focus and also i have to out focus change the colors and font back to normal.

Also, i need to keep a data in cache which will tell me the last screen from which user is coming while going through various screens. How i can achieve it.

please let me know.

As i am new to mobile domain, if posible please show me some sample or code change.

Following is code sample

Code:
public class LandingScreen extends MainScreen
{
	//LabelField mostPopular = new LabelField("Most Popular",Field.FOCUSABLE|Field.FIELD_LEFT|Field.HIGHLIGHT_FOCUS);
	private LabelField mostPopular;
	private LabelField newlyAdded;
	private LabelField allCategories;
	private LabelField spacer1;
	private LabelField spacer2;
	public LandingScreen()
	{
		HorizontalFieldManager topTabManager = new HorizontalFieldManager(Manager.HORIZONTAL_SCROLL);
		mostPopular = new LabelField("Most Popular",LabelField.FOCUSABLE | LabelField.HIGHLIGHT_SELECT);
		newlyAdded = new LabelField("Newly Added",LabelField.FOCUSABLE | LabelField.HIGHLIGHT_SELECT);
		allCategories = new LabelField("All Categories",LabelField.FOCUSABLE | LabelField.HIGHLIGHT_SELECT);
		spacer1 = new LabelField(" | ", LabelField.NON_FOCUSABLE);
		spacer2 = new LabelField(" | ", LabelField.NON_FOCUSABLE);
		
				
		topTabManager.add(mostPopular);
		topTabManager.add(spacer1);
		topTabManager.add(newlyAdded);
		topTabManager.add(spacer2);
		topTabManager.add(allCategories);
		add(topTabManager);
	}
	
	public boolean onClose()
	{
		Dialog.alert("Goodbye!");
		//NewScreen pScreen = new NewScreen();
        //UiApplication.getUiApplication().pushScreen(pScreen);
		System.exit(0);
		return true;
	}
}
__________________

Thanks,
Regards,
Amber
Offline  




Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.