Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15982] Android: Integrate v7 of appcompat libraries

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2014-01-21T23:48:18.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.3.0
ComponentsAndroid
Labelsplanning-3.3.0, q1-2014-candidate
ReporterIngo Muschenetz
AssigneeHieu Pham
Created2013-12-13T11:13:30.000+0000
Updated2017-03-21T23:03:20.000+0000

Description

Update our library usage to include appcompat v7: http://developer.android.com/tools/support-library/features.html#v7-appcompat This will allow Action Bar support on a wider range of Android devices. Currently, it is limited to API level 11 and above. There should be no discernible changes to most users except that the action bar now works on all Titanium-supported API levels. However, users with custom themes will have to alter them slightly as noted below. Users can define custom themes in theme.xml then manually add it to the manifest via tiapp.xml. Here's an example of a custom theme:
<style name="Theme.Custom" parent="@android:style/Theme.Translucent">
        <item name="android:windowIsFloating">true</item>
</style>
This defines "Theme.Custom" which extends Theme.Translucent (a native Android theme). In order for them to get this working with AppCompat, they need to convert this custom theme to something like this:
<style name="Theme.Custom" parent="@style/Theme.AppCompat">
      <item name="android:windowBackground">@android:color/transparent</item>
      <item name="android:colorBackgroundCacheHint">@null</item>
      <item name="android:windowIsTranslucent">true</item>
      <item name="android:windowAnimationStyle">@android:style/Animation</item>
     <item name="android:WindowIsFloating">true</item>
</style>
Note that this theme has 5 items while the previous has only one. This is because Theme.AppCompat is a base theme (i.e. not Theme.Translucent) so we need to add the items of Theme.Translucent (the first 4 items). This can be easily done by looking at the source code of Theme.Translucent: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/res/res/values/themes.xml Tasks for this ticket:

integrate v7.

clean up WindowProxy, remove LW windows.

implement Fragments as LW windows.

remove sync events from activity (send a mail to Titan). Get rid of sync events and eat back button until v8 engine is initialized.

refactor TabGroup (separating ActionBar from TabHost and move TabHost to Android namespace and deprecate it).

support custom theme (optional - implement resource loader)

Modify default theme to support action bar.

Comments

  1. Allen Yeung 2014-01-21

    Duplicate of TIMOB-15021
  2. Lee Morris 2017-03-21

    Closing ticket as duplicate with reference to the above comments.

JSON Source