[ALOY-210] Support Dynamic Styling

GitHub Issuen/a
TypeNew Feature
Resolution Date2013-07-16T22:25:54.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.2.0, 2013 Sprint 15
ComponentsStyling, Testing, Titanium SDK
Labelsnotable, qe-testadded
ReporterTony Lukasavage
AssigneeTony Lukasavage


In TiSDK 2.2 (3.0), all platforms are adding support for an applyProperties() function which will allow developers to efficiently apply a set of properties all at once, just like at create time. Once this is available, Alloy should use this function to apply styles dynamically at runtime. This will help us with things like handling style change on orientation change or other runtime events. In addition to allowing us to make these changes based on specific runtime events, we should also expose a simple function for applying a style to an element manually. We will need to have a discussion as to whether it makes more sense to apply these properties to a controller as a whole, which IMO makes the most logical sense, or to concoct a way to allow us to apply parts of tss files to specific elements. Likely separate jira tickets will be created for these issues.


We will not be able to use applyProperties() or any alloy functionality that relies on it in any version before 2.2 (3.0). As with ALOY-209, this requires us to decide what will be the minimum version of TiSDK supported.


  1. Tony Lukasavage 2012-08-29 Work won't really be able to begin on this one until ALOY-211 is resolved. Also, I gave a day as the estimate, but I have a feeling since this is brand new TIMOB functionality that there will be a lot of testing and back-and-forth with the platform team. It could go a good bit longer depending on the level of parity and stability.
  2. Martin Guillon 2012-12-15 Does that mean we are gonna be able to do:
       $.view.applyProperties({id:'view', class:'selected');
    I use titanium redux and that's one of the only things keeping me from moving to alloy
  3. Tony Lukasavage 2012-12-17 @Martin: essentially, yes
  4. Martin Guillon 2012-12-17 @Tony: ok thanks. By the way i have been playing quite a lot with alloy and would like to give you my feedback on it. Where can i do that? Q&A? are you gonna see it?
  5. Tony Lukasavage 2012-12-17 @martin: most of our discussion with the community goes on at the google group: https://groups.google.com/forum/?fromgroups#!forum/appc-ti-alloy
  6. Raymond Verbruggen 2013-07-05 Hello Tony, I've just "moved" to Alloy, and it's amazing... A main descision was that it would be easy to create themes. For a project that I have to finish end july I need multiple themes. From the documentation about themes the part about dynamic switching (or not to be able to do this) was overlooked by me. However from the planning the feature should be available very soon. Could you please confirm the availability date of Alloy 1.2 which has the ability of switching between themes. For me also this is a critical item! Looking forward to hearing from you. Best regards, Raymond Netherlands mail@focussing.nl
  7. Tony Lukasavage 2013-07-16 Initial implementation of dynamic styling has been completed. Any additional issues related to dynamic styling will be created in separate tickets.

JSON Source