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

Ti.UI.backgroundColor/Ti.UI.backgroundImage not translucent

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: Release 1.7.0, Release 1.7.1, Release 1.7.2, Release 1.8.0
    • Fix Version/s: Release 2.1.0, Sprint 2012-07
    • Component/s: Android
    • Environment:

      SDK 1.7.0, 1.7.1, 1.7.2, 1.8.0v20110725142947. HTC Hero running 2.1-update1, Nexus One running 2.2.2, Xoom tablet running 3.2. Titanium Studio, build: 1.0.2.201107130739.

    • Story Points:
      2

      Description

      Setting background on Root Window

      1) Create project in TiStudio and replace app.js with

      Ti.UI.backgroundColor = '#f00';
      Ti.UI.backgroundImage = 'KS_nav_ui.png';
       
      var win = Ti.UI.createWindow();
      win.open();
      

      (or use attached Resources folder)

      2) Launch application

      Expected: Image appears with a red background.
      Actual: Only image appears. (See screen shot)

      Note:
      Talked to Jon Alter about this. He says it isn't a major issue because he doesn't see a circumstance where someone would set the background this way.

      It is a parity issue. Setting the background this way works as expected on iOS devices.

      Setting background on a view.

      Verify image is shown with a red background.
      Also verify background color changes when the state of the
      view changes (ex: focused, selected).

      var win = Ti.UI.createWindow({
      	backgroundColor: 'white',
      	layout: 'vertical'
      });
       
      var colorView = Ti.UI.createView({
      	width: 400, height: 400,
      	focusable: true,
      	backgroundColor: 'blue',
      	backgroundImage: 'background.png',
      	backgroundSelectedColor: 'red',
      	backgroundFocusedColor: 'yellow',
      	backgroundDisabledColor: 'black'
      });
      win.add(colorView);
       
      var disableButton = Ti.UI.createButton({
      	title: 'Enable/Disable View',
      	width: 150
      });
      disableButton.on('click', function() {
      	colorView.enabled = !colorView.enabled;
      });
      win.add(disableButton);
       
      win.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                joshroesslein Josh Roesslein
                Reporter:
                avaghti Alan Vaghti
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration