[TIMOB-16436] Android: Integrate AppCompat custom theme + ActionBarActivity
GitHub Issue | n/a |
---|---|
Type | Sub-task |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-02-20T23:27:12.000+0000 |
Affected Version/s | n/a |
Fix Version/s | 2014 Sprint 04, 2014 Sprint 04 API, Release 3.3.0 |
Components | Android |
Labels | api |
Reporter | Hieu Pham |
Assignee | Hieu Pham |
Created | 2014-02-10T19:26:20.000+0000 |
Updated | 2017-03-16T21:43:42.000+0000 |
Description
Now that we have integrated appcompat libraries, the next step is to extend ActionBarActivity to TiBaseActivity, set up custom themes and add support for ActionBarActivity (ActionBar support for older devices)
Android theme source for reference: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/res/res/values/themes.xml
Testing steps:
1. Run scons and make sure basic titanium apps run successfully.
2. Run Anvil to make sure no new failures
3. Run this code on both HoneyComb+ and 2.x devices
var tabgroup = Ti.UI.createTabGroup();
var win1 = Ti.UI.createWindow({backgroundColor: 'red'});
var tab = Ti.UI.createTab({window: win1, title: 'Tab1'});
var win2 = Ti.UI.createWindow({backgroundColor: 'blue'});
var tab2 = Ti.UI.createTab({window: win2, title: 'Tab2'});
tabgroup.addTab(tab);
tabgroup.addTab(tab2);
tabgroup.open();
You should see the action bar with 2.x device.
master PR: https://github.com/appcelerator/titanium_mobile/pull/5348 Kitchensink update: https://github.com/appcelerator-developer-relations/KitchenSink/pull/141
It's impossible to hide the action bar after this release..
Closing ticket as the issue has been fixed.