Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15021] Android: Use new ActionBar compatibility in Android Support Library 18 to enable ActionBar on all Android versions

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-03-28T22:46:24.000+0000
Affected Version/sn/a
Fix Version/s2014 Sprint 06, 2014 Sprint 06 SDK, Release 3.3.0
ComponentsAndroid
Labelsactionbar, android, module_actionbar, qe-testadded, triage
ReporterMark Mokryn
AssigneeHieu Pham
Created2013-08-20T08:06:41.000+0000
Updated2014-05-02T22:17:00.000+0000

Description

This is new in Android Support Library 18: http://developer.android.com/reference/android/support/v7/app/ActionBar.html Should be relatively low hanging fruit - use the support library's activity and action bar's APIs instead of the base Android APIs, and we get Action Bars on all Android versions :) Titanium already uses the v4 support library for things like fragments - just need to upgrade to the latest v4, add the v7 appcompat lib, and mostly find where android.app.Activity should be replaced by android.support.v7.app.ActionBarActivity Google video on usage of this library: http://www.youtube.com/watch?v=6TGgYqfJnyc

Comments

  1. Mark Mokryn 2013-08-20

    I was able to build 3.2.0 with this, but trying to run a test app Studio can't find the resource. If anyone on the Ti team can help it would be great. The intent is to submit a pull request if I can get it to work. See my issue here: http://developer.appcelerator.com/question/156202/android-actionbar-compatibility-library
  2. Mark Mokryn 2013-08-21

    Pull request: https://github.com/appcelerator/titanium_mobile/pull/4591 Builds cleanly but untested due to the issue in previous comment. It would be great if someone familiar with Titanium Android build integration can help...... Thanks.
  3. Viktor Korol 2013-09-17

    Please add this very useful feature to Titanium Mobile.
  4. Mark Mokryn 2013-09-17

    I believe (hope?) I already did much of the work required - just stuck on how to use an Android library with resources on Titanium, so I can't test. This is a generic issue - not due to this library specifically. Would be great if anyone can assist with that aspect, at least.
  5. Alexey Chulochnikov 2013-09-17

    Please add this to the Titanium Mobile!!!
  6. Lee Driscoll 2013-10-22

    Please can we have an official response to this. As it stands this is much needed functionality and it's making life very difficult not knowing if this will be implemented. If it's not happening at all then please just say. I would like to know whether to hold out for this or to start hacking something in myself.
  7. John Oliva 2013-10-22

    Hello Lee, I agree with the need for this capability and I think it is necessary for Titanium to live up to the vision of providing a first class native experience. I believe that Appcelerator uses the number of watchers as a measure of the interest by the community. If you really want to see this happen, you might try to rally the community to sign up as watchers to make this a more visible issue. John
  8. Mark Mokryn 2013-10-22

  9. Darren Haligas 2013-10-24

    This would be huge if you can get this in sooner than later.
  10. Martin Guillon 2013-10-28

    I actually managed to have actionbarsherlock (and appcompat before) working with Ti framework. I have it packaged with the framework then correctly used to generate and compile the app. I was abled to do that thanks to the new cli for Android. Thanks to a few line changes i had it working great. And it should work with any 3rdparty library. A little more work needs to be done to allow it inside submodules. But it s mostly there Will soon be published [here](https://github.com/Akylas/titanium_mobile)
  11. Mark Mokryn 2013-11-15

    According to Martin and Chris Barber we are already there: https://github.com/appcelerator/titanium_mobile/pull/4935 Any chance of pushing ActionBarCompat to 3.2.0? Would be a huge win! The source code changes in Titanium are actually quite few.
  12. Ingo Muschenetz 2013-11-15

    I don't believe so, but we'll take a look.
  13. Fokke Zandbergen 2014-01-22

    This would be great to have in 3.3.0, since Android 2.3.3. will still be around for some time. I see people still buying new (!!) phones running this.
  14. Mark Mokryn 2014-02-04

    This is actually quite urgent. For example, the Google Cast Android Sender API requires the appcompat library. https://developers.google.com/cast/docs/android_sender Also noting from that page: Note: Since the libraries contribute resources, you cannot simply satisfy the dependencies by including their JAR files; instead you need to import them as library projects for your IDE.
  15. Mark Mokryn 2014-03-06

    It's awesome that this is already merged for 3.3.0 - great job! Now that this is done it's a great time to add full support for Action Bar functionality for all Android versions: * Action Views (parity with iOS titleControl) * Action Providers, including Share and Custom action providers * Dropdown navigation * ActionBar styling * Split ActionBar
  16. Vishal Duggal 2014-03-28

    All subtasks done. Resolving Ticket
  17. Mark Mokryn 2014-04-07

    I just tried 3.3.0 Kitchen Sink, it works fine. However when I tried to use the SearchView widget it bugged out complaining that it requires API 11. It would be a shame to go this far and not use all the appcompat features, including SearchView, e.g. https://developer.android.com/reference/android/support/v7/widget/SearchView.html
  18. Hieu Pham 2014-04-07

  19. Fokke Zandbergen 2014-04-08

    And how about action providers? Is there a ticket for that already? Would really like to use the share action provide eg.

JSON Source