[TIMOB-12477] Android: Tab Icons not displayed with Theme.Holo
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-02-22T21:51:35.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 3.1.0, 2013 Sprint 04 API, 2013 Sprint 04 |
Components | Android |
Labels | android, api, holo, insight |
Reporter | Thomas Keunebroek |
Assignee | Vishal Duggal |
Created | 2013-01-10T05:59:33.000+0000 |
Updated | 2013-07-12T08:54:18.000+0000 |
Description
When using the Holo Theme in your Android application (Android version > 3.0), the tabs icons are not displayed anymore.
To reproduce, just download the KitchenSink sample and add the following lines in the tiapp.xml
- before the part:
declaration:
<uses-sdk android:targetSdkVersion="11"/>
- in your android:theme="@android:style/Theme.Holo"
You'll see that the tabs don't have icons anymore.
Attachments
File | Date | Size |
---|---|---|
tabs-holo.png | 2013-01-10T05:59:33.000+0000 | 55792 |
Can you provide either a titanium projec sample or tiapp.xml file? It will allow to replicate what you're seeing quicker, thanks. Hope hearing from you soon, Thomas.
Well, like I said, you just need the KitchenSink using the Android Holo theme to replicate. However, here's a sample app I've just built using the "Tabbed Application" sample from Titanium Studio. tiapp.xml
app.js
ApplicationTabGroup.js
ApplicationWindow.js
Please note that the only things that have been modified from the sample is the tiapp.xml, with the Android API version and the Holo theme. If you just remove the
Moved to main project to dig into it. Above test reproduces the issue. Tested multiple times, attaching yet another tiapp.xml.
Tested on
Android Emulator - Google APIs Android 4.0 & 4.0.3tiapp.xml
Looks like an android bug. We can reproduce the same issue in a stand alone android application with holo theme.
Looks like an android bug. We can reproduce the same issue in a stand alone android application using holo theme.
Well, there are plenty of native Android apps that use tab along with icons. For instance, the official Contact app. I've been digging into the source code a bit, they set icons here: https://github.com/android/platform_packages_apps_contacts/blob/master/src/com/android/contacts/activities/ActionBarAdapter.java#L262 Thanks again for your feedback. Regards,
in progress
Pull pending against master https://github.com/appcelerator/titanium_mobile/pull/3873 This adds support for setting the icons on ActionBarTab. Might fix the holo issue as well.
Environment Used - SDK - 3.1.2.v20130710144553, 3.1.1.GA Appcelerator Studio - 3.1.2.201307101037 Device - Nexus 7(v4.1) acs - 1.0.3 alloy - 1.1.3 npm - 1.2.14 titanium - 3.1.1 titanium-code-processor - 1.0.1 Reproduced this issue using 3.0.2.GA build but unable to reproduce using 3.1.1.GA and latest 3.1.2.v20130710144553 sdk builds. Tabs icon are displayed using Holo theme. Used Kitchen Sink application for verification. Hence closing this issue.