stealthdyno
stealthdyno

Reputation: 185

Custom Tabgroup Appcelerator

I'm trying to make a custom tabgroup in appcelerator in which one (or two) of the tabs is bigger than the rest. I have attached an image of what I'm trying to pull off.

I am able to make a custom tabgroup, but it refreshes each time I change a tab, and I want my tabs to behave like a native tabgroup. Any help would be much appreciated

Example

Upvotes: 2

Views: 3021

Answers (3)

André B.
André B.

Reputation: 689

This also looks promising:

https://github.com/viezel/NappUI#tabgroup

You can set a background image for active tab background. The advantage to this approach is that it uses the native iOS API. Actually, it will extend the Titanium tabgroup proxy and add some methods. No hacks required.

Upvotes: 0

stealthdyno
stealthdyno

Reputation: 185

I figured out this issue. For anyone that has this same issue in the future this should help: The tabgroup is its own view. If you want to add overlays to it, make a new view, and add it to the tabgroup, NOT to the window itself.

Upvotes: 0

Dawson Toth
Dawson Toth

Reputation: 5680

As you mentioned in a comment, on iOS the tab group it itself a view. You can add views to it, and they will persist regardless of which tab is active. Because you can programmatically change the active tab, you can overlay views on top of the normal tab group and use them to decide which tab should be active.

The following Gist demonstrates this: https://gist.github.com/853935

Upvotes: 3

Related Questions