[TIMOB-10897] Android: Allow default themes to be set from tiapp.xml
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2013-08-06T22:59:28.000+0000 |
Affected Version/s | Release 2.0.2 |
Fix Version/s | n/a |
Components | Android, Tooling |
Labels | androidbuild, cb-verified, core |
Reporter | Arthur Evans |
Assignee | Chris Barber |
Created | 2012-09-13T12:00:20.000+0000 |
Updated | 2017-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.
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.
Closing ticket as the issue will not fix and with reference to the above comments.