Discussion Forums  >  Status Bar, Navigation Bar

Replies: 2    Views: 91

Caslor
Android Fan
Profile
Posts: 191
Reg: Jul 26, 2013
athens
1,910
12/16/15 04:39 AM (3 years ago)

Tabbed bar configuration

Hi
where is the file that tabbed bar menu calls the attributes ?

In my app doesnt show the full text bellow the images in my tabbed menu and i want to see if i can change the code to display the text with smaller fonts or make it to display them full

thanks in advance
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
12/16/15 07:59 AM (3 years ago)
I just have this feeling you want this in android. And at the moment, I don't have my android stuff up and running; I'm working in iOS.

So.....

Put this in your notes for later, when you work on an iOS project...

In your "BT_application.m" file, search for this line:

[thisTabsNavController.tabBarItem setImage:tabIcon];

and right underneath that, is where you want to put your code.

The properties are now in a 'dictionary', so you have to set stuff up before you can actually implement anything:

NSShadow *shadow = [[NSShadow alloc] init];
shadow.shadowColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.8];
shadow.shadowOffset = CGSizeMake(0, 1);
UIColor *myColor = [BT_color getColorFromHexString:@"#6D6C3A"];
NSDictionary *textola = [NSDictionary dictionaryWithObjectsAndKeys:
myColor, NSForegroundColorAttributeName,
shadow, NSShadowAttributeName,
[UIFont fontWithName:@"AmericanTypewriter" size:10.0], NSFontAttributeName, nil];

once you have your properties setup, add this line:

[thisTabsNavController.tabBarItem setTitleTextAttributes:textola forState:UIControlStateNormal];

and voila, your tab item font has been customized.

Sorry I'm not working in Android at the moment, but if you still don't have an answer by the time I do, I'll play with it a little and let you know.

Cheers!

-- Smug
 
Caslor
Android Fan
Profile
Posts: 191
Reg: Jul 26, 2013
athens
1,910
like
12/17/15 01:16 PM (3 years ago)
Thanks :)
(i will need this for sure for my future ios projects)
i will wait for the time you will start the android

thanks again
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.