Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10897] Android: Allow default themes to be set from tiapp.xml

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionWon't Fix
Resolution Date2013-08-06T22:59:28.000+0000
Affected Version/sRelease 2.0.2
Fix Version/sn/a
ComponentsAndroid, Tooling
Labelsandroidbuild, cb-verified, core
ReporterArthur Evans
AssigneeChris Barber
Created2012-09-13T12:00:20.000+0000
Updated2017-03-22T18:32:05.000+0000

Description

Currently, we generate an AndroidManifest.xml with two themes essentially hardcoded: the launcher activity has the Titanium theme (parent android:Theme, the default theme for API level 10 and earlier) and the TiModal and TiTranslucent activities (used for modal windows, among other things) uses the android Translucent theme (again, an API level 10 and earlier theme). You can set an application-level theme in tiapp.xml, but it will be overridden by the activity themes. We can override these activity themes with a custom android manifest, or by copying activities from the manifest into tiapp.xml and modifying them, but I'm wondering whether it might be more straightforward to add a tiapp.xml property that specifies the default themes for each of these pre-generated activities. There may be other approaches here, but it seems like we could make themes easier to use. One alternate approach: simple include the boilerplate for these activities in the default tiapp.xml, instead of forcing users to build the application and copy the boilerplate into the tiapp.xml file in order to change themes.

Comments

  1. Chris Barber 2013-08-06

    After discussing with Allen and Vishal, we decided the better solution is to allow the theme to be set programmatically when the activity is started. Since this may be a major effort, we may want to defer until Ti.next.
  2. Lee Morris 2017-03-22

    Closing ticket as the issue will not fix and with reference to the above comments.

JSON Source