Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1011] Android ActionBar: issues using TSS styles

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-05-12T16:18:54.000+0000
Affected Version/sAlloy 1.4.0
Fix Version/sAlloy 1.4.0
ComponentsStyling
Labelsqe-3.3.0, qe-testadded
ReporterFederico Casali
AssigneeTim Poulsen
Created2014-05-09T21:36:22.000+0000
Updated2014-06-22T13:21:24.000+0000

Description

Problem description

When using TSS Styles for Android ActionBar, there are some unexpected behaviors. Reference code: https://github.com/federico1525/alloy/tree/ALOY-991/test/apps/testing/AndroidMenuStyles

ID defined styles are not respecting the platform specific priority

Steps: 1. Run the sample code Result: "index ID Menu Title " and "index ID subtitle" are displayed on top, instead of the android/index.tss defined style, "subfolder ID Menu Title " and 'subfolder ID menu subtitle'. So, the "styles/index.tss" has precedence over "styles/android/index.tss", which is not expected.

Class defined styles are not working

1. Edit sample code styles/index.tss and styles/android/index.tss. Comment the "#actionmenu" ID styles. 2. Un-comment the ".menuclass" class defined styles 3. Run the sample Result: No title is displayed. ActionMenu ".class" styles defined in both files (generic and platform specific) are not applied.

API defined styles are not working

1. Edit sample code styles/index.tss and styles/android/index.tss. Comment the ".menuclass" class styles 2. Un-comment the "Menu" API name defined styles 3. Run the sample Result: No title is displayed. ActionMenu "APIname" styles defined in both files (generic and platform specific) are not applied.

Comments

  1. Tim Poulsen 2014-05-12

    PR: https://github.com/appcelerator/alloy/pull/393 Test app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-1011 Functional test steps: Build the associated app for Android. In its initial state, menu styles are applied from the styles/index.tss file with the API < class < id hierarchy correctly applied. For subsequent runs of the test, edit styles/index.tss and/or styles/android/index.tss to uncomment various combinations of menu style selectors to ensure that the hierarchies are applied correctly each time.
  2. Tim Poulsen 2014-05-12

    PR merged
  3. Lokesh Choudhary 2014-05-12

    Verified the fix. Tried for subsequent runs various combinations of menu style selectors by editing styles/index.tss and/or styles/android/index.tss & they work as expected. Closing. Environment: Appc Studio : 3.2.3.201404290818 Ti SDK : 3.3.0.v20140512124113 Mac OSX : 10.8.5 Alloy : 1.4.0-dev CLI - 3.3.0-dev Samsung Galaxy S4 running android 4.2.2

JSON Source