this is a custom tabgroup class done in js by using standard ti-mobile view-classes that will look the same on android and iphone. i used this for an app called "A1 BVB Grand Slam" that was released for Android some days ago, and will be in the Apple appStore tomorrow if things go well
the code should be self-explanary!
you can get it on my public dropbox:
screenshot android: http://dl.dropbox.com/u/143939/tabs_xcompat_android.png
screenshot iphone: http://dl.dropbox.com/u/143939/tabs_xcompat_iphone.png
also thanx to bill dawson from appcelerator who helped me getting it working on both platforms!
The custom tab group program, you made, is not working in Titanium 1.5.1. The error message says "IllegalArgumentException: Expected 2 arguments for log, got 1(app://app.js#77). Do you know what the issue could be?
Hi Christian, thanks for your contribution. I noticed that in app.js, you did this:
e.window.open(); e.window.show(); // And: e.window.hide(); e.window.close();
Any reason for doing this?
I was playing around with your class and customised it further; it seems to work quite well, but when I try to display a scrollView, it displays the scroll view two times, one on top of the other. The first is scrollable by mouseclick / finger drag, and the other is scrollable by mousewheel / finger swipe on Android's navigator.
I'll probably have to figure a solution out by myself. Just giving a heads up for those of you who're using this custom class.
Here is the details of the error I get in the log window with 'info' chosen. [WARN] (skipping hidden file '/Users/flashdev/appcelerator/tabs_xcompat/build/android/bin/assets/.DS_Store') [WARN] (skipping hidden file '/Users/flashdev/appcelerator/tabs_xcompat/build/android/bin/assets/Resources/.DS_Store') [WARN] (skipping hidden file '/Users/flashdev/appcelerator/tabs_xcompat/build/android/bin/assets/Resources/images/480x854/.DS_Store')
This is using version 1.5.1
First off thanks for sharing. This is exactly what I was looking for. However, I'm having an issue. The window displayed as my initial tab doesn't seem to respond to the events it registers. Button clicks don't do anything and the window seems to never close. If I take the same tab and make it the "2nd" tab things seem better.
Thanks for sharing!
It works in Titanium 1.5.1. You just need to comment out the logging lines in each file, or fix the syntax errors on those lines. I just commented them out.
It just does not work in landscape mode. Tilt the phone with Ctrl + F11 and you'll find the navigation does not fix nicely. But it is a good example to get me started and I appreciate your post.
I am going to download "A1 BVB Grand Slam" to figure out how you sized the navigation on tilt.
sorry, for not having answered all those questions, i simply didn't get any notification after my latest comment 8 months ago
i'm now in the situation of having to update the app i used the tab-code for, and found that in the latest ti-mobile releases there is a nasty crash in android when switching tabs that do include a webview. so if anyone run over this issue while using my code, and found a fix, i'd be more than happy hearing from you ;-)
Another tab group for Android and Web on Marketplace
Sorry to rake up an old post, how do I get this to work?
How do I get this to work?
Christian, I am using your example for my application.
this is on iphone android is working good.
I am getting an issue. I have custom navigation with three tabs.
My second tab have button after clicking it, it will open new window,
At the time Iam in new window if i click top navigation my new window from button click is not closing.
how can I close that sub window?
Christian, thank you so much for sharing with us,
Android 2.2-api works fantastic
Iphone iOS 4.0.2, TI sdk 220.127.116.11, tab3 crash, also I will paste the logs:
do you thing you can put your excelent work compatible with spec above?
Keep your good work!
i need some help if possible.
Your custom tabs work perfectly, but if i switch from tab to tab, the previous content is not saved, therefore if i am in some child windows, i and switch tabs, when i go back, its the window recreated from scratch.
Is there any way of saving the pages when you switch.
I run your code perfectly in Android 2.2, but when I run your code in iPhone 4.2, I got following error…
[ERROR] Error: Traceback (most recent call last):
File "/Library/Application Support/Titanium/mobilesdk/osx/1.6.0/iphone/builder.py", line 1003, in main
execute_xcode("iphonesimulator%s" % link_version,["GCC_PREPROCESSOR_DEFINITIONS=LOGID__=%s DEPLOYTYPE=development TI_DEVELOPMENT=1 DEBUG=1 TI_VERSION=%s" % (log_id,sdk_version)],False)
File "/Library/Application Support/Titanium/mobilesdk/osx/1.6.0/iphone/builder.py", line 924, in execute_xcode
output = run.run(args,False,False,o)
File "/Library/Application Support/Titanium/mobilesdk/osx/1.6.0/iphone/run.py", line 39, in run
I found the two file "MainWindow.xib" and "MainWindow_ipad.xib" in iphone directory, is it a reason cause this issue?