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

Android: Views: The visible property of a view is undefined by default

    Details

      Description

      The default value of a view added to a window is "undefined".

      This is not a regression. The behavior exists as far as 1.8.2

      Steps to reproduce:
      1. Create an application with code below and launch the application
      2. Click on Show/Hide button

      Actual: An alert with value "undefined" is shown which is the value of visible property of view.

      Expected: The value should be returned as "true"

      var _window = Ti.UI.createWindow({
      		backgroundColor:'white'
      		});
       
      		var view = Ti.UI.createView({
      			backgroundColor:'red',
      			width:100,
      			height:100,
      			top:20
      		});
      		_window.add(view);
      		
      		var b = Ti.UI.createButton({
      			title:'Show/hide',
      			width:140,
      			height:40,
      			top:160
      		});
      		
      		b.addEventListener('click', function() {
      			alert('Visible: '+view.visible);
      			if (view.visible) {
      				view.hide();
      			}
      			else {
      				view.show();
      			}
      		});
      		_window.add(b);
      		_window.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bijuexalture Biju pm
                Reporter:
                ssekhri Satyam Sekhri
                Reviewer:
                Allen Yeung
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code