Activity

{html}<div><p>Here's some native code you can play with that mimics how we
create tabs:</p>
<p><strong>HelloTabWidget.java</strong></p>
<pre>
<code class=
"javascript">package com.billdawson.android.hellotabwidget;

}</code>
</pre>
<p>This native example creates the <code>TabHost</code> using
<code>new TabHost(...)</code> like we do in our TiUITabGroup.java.
It works fine in api 10 and lower, but not in api 11 (Honeycomb).
If you alter the native code above (HelloTabWidget.java) so that
<code>HelloTabWidget</code> extends <code>TabActivity</code>
instead of <code>ActivityGroup</code>, then replace <code>TabHost
tabHost = new TabHost(this);</code> with <code>TabHost tabHost =
getTabHost();</code>, it will work fine in Honeycomb.</p>
<p>I don't think we'll be able to solve this until we can see
Honeycomb source code and see how the updated
<code>TabActivity</code> creates its <code>TabHost</code> so we can
do something similar. Some resource is missing, apparently. Maybe
we need to do a <code>.setId(...)</code> on something.</p></div>{html}

{html}<div><p>(from <a href=
"/projects/32238/changesets/19728696a23a8f9d45e044ead3b39162c68706fb"
title=
"Changeset [19728696a23a8f9d45e044ead3b39162c68706fb]">[19728696a23a8f9d45e044ead3b39162c68706fb]</a>)
Change TiTabActivity to inherit from TabActivity so as to use
TabHost in the manner expected by android (TabActivity.getTabHost()
rather than new TabHost()). This enables our default apps (the
two-tab app that gets created when you create a new titanium
project) to run on Honeycomb. [<a href=
"/projects/32238/tickets/3244" title="Ticket #3244">#3244</a>]
<a href=
"https://github.com/appcelerator/titanium_mobile/commit/19728696a23a8f9d45e044ead3b39162c68706fb">https://github.com/appcelerator/titanium_mobile/commit/19728696a23a...</a></p></div>{html}

Bill Dawson
added a comment - 14/Apr/11 8:40 PM {html}<div><p>(from <a href=
"/projects/32238/changesets/19728696a23a8f9d45e044ead3b39162c68706fb"
title=
"Changeset [19728696a23a8f9d45e044ead3b39162c68706fb] "> [19728696a23a8f9d45e044ead3b39162c68706fb] </a>)
Change TiTabActivity to inherit from TabActivity so as to use
TabHost in the manner expected by android (TabActivity.getTabHost()
rather than new TabHost()). This enables our default apps (the
two-tab app that gets created when you create a new titanium
project) to run on Honeycomb. [<a href=
"/projects/32238/tickets/3244" title="Ticket #3244">#3244</a>]
<a href=
"https://github.com/appcelerator/titanium_mobile/commit/19728696a23a8f9d45e044ead3b39162c68706fb">
https://github.com/appcelerator/titanium_mobile/commit/19728696a23a ...</a></p></div>{html}