Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-25023

Windows: BackgroundColor won't get applied when touchEnabled=false

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: Release 6.1.0
    • Fix Version/s: Release 6.2.0
    • Component/s: Windows
    • Labels:
      None
    • Environment:

      SDK 6.1.1
      CLI 6.2.2
      Microsoft Windows 10 Pro
      10.0.15063
      64bit

    • Story Points:
      5
    • Sprint:
      2017 Sprint 16 SDK

      Description

      It seems that if you try setting certain properties like backgroundColor in the controller and NOT in the tss file, these get ignored.

      Reproduce Steps:

      1) Open example code attacheded in a alloy project.
      2) Observe how $.square has no backgroundColor defined (commented out, line 26)
      3) In index.js observe how $.square's backgroundColor is being set (to backgroundColorChecked, which is equal to red).
      4) Compile and run app (can be done with -T ws-local)
      5) When app launches, observe how $.square seems not to show, like it's not there. That's because the backgroundColor set in line 4 of index.js didn't really work
      6) Also, observe how $.square.backgroundColorChecked=red and $.square.backgroundColorUnchecked=blue prints in the console, so the reference to the colors actually exists.
      7) Go to index.tss and uncomment line #26 out.
      8) Compile the app and run it again. Observe how the backgroundColor is indeed applied this time to $.square.
      9) Also observe how width and height values set in lines 6 and 7 of index.js seem to be applied to $.square just fine, unlike backgroundColor.

      Note

      Tested this with Android and iOS and it works there.

      Plus

      Same EXACT behavior happens with the backgroundImage property of Ti.UI.View AND color property of a Ti.UI.Label.

        Attachments

        1. index.js
          0.3 kB
        2. index.tss
          0.7 kB
        3. index.xml
          0.1 kB

          Issue Links

            Activity

              People

              • Assignee:
                kiguchi Kota Iguchi
                Reporter:
                sliang Shuo Liang
                Reviewer:
                Gary Mathews
                Tester:
                Samir Mohammed
              • Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-10932
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code