Titanium JIRA Archive
Appcelerator Community (AC)

[AC-3400] Visible = false propert not working on Windows Phone

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2016-03-25T19:02:22.000+0000
Affected Version/sAppcelerator Studio 4.5.0
Fix Version/sn/a
ComponentsAlloy
Labelsvisible, windows8.1, windows_phone
ReporterParmeet Singh
AssigneeShak Hossain
Created2016-03-22T14:23:55.000+0000
Updated2016-03-25T19:02:22.000+0000

Description

I want to hide my button when page opens, but it is not working for Windows phone 8.1. I tried $.button.visible = false; and $.button.hide(); but nothing works. Pl help.

Comments

  1. Jebun Naher 2016-03-23

    Hello, I have tested a classic code and tried it on alloy as well. Visible property for button is working for both alloy and classic on my end. *Testing Environment:*
       Appcelerator Command-Line Interface, version 5.2.0
       Copyright (c) 2014-2016, Appcelerator, Inc.  All Rights Reserved.
       Operating System
         Name                        = Microsoft Windows 8.1 Enterprise
         Version                     = 6.3.9600
         Architecture                = 32bit
         CPUs                      = 4
         Memory                      = 3.9GB
       Node.js
         Node.js Version             = 0.12.7
         npm Version                 = 2.11.3
       Appcelerator CLI
         Installer                   = 4.2.3
         Core Package                = 5.2.0
       Titanium CLI
         CLI Version                 = 5.0.6
         node-appc Version           = 0.2.31
       Windows Phone: 8.1
       SDK = 5.4.0.v20160307212310, 6.0.0.v20160206012308, 5.1.2GA, 5.2.0GA
       
    *Test Case:* *Classic* app.js
       
       
       
       var win = Ti.UI.createWindow({
       
       
           backgroundColor : 'white'
       
       
       });
       
        
       
       
       var button = Titanium.UI.createButton({
       
       
           title : 'Hello',
       
       
           top : 10,
       
       
           width : 100,
       
       
           height : 50
       
       
       });
       
       
       button.addEventListener('click', function(e) {
       
       
           Titanium.API.info("You clicked the button");
       
       
           button.visible = false;
       
       
       });
       
        
       
       
       win.add(button);
       
        
       
       
       win.open(); 
       
    *Alloy* index.xml
       <Alloy>
           <Window >
               <!-- The title property can also be defined as node text. -->
               <Button id="button"  title="Hello"
                   top="10" width="100" height="50" />
           </Window>
       </Alloy>
       
    index.js
       $.button.visible = false;
       //$.button.hide();
       $.index.open();
       
    Please use the latest SDK 5.2.0.GA for development.Thanks

JSON Source