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

Android: Ti.UI.Button can't be disabled until displayed as of 6.1.0

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 6.1.0
    • Fix Version/s: Release 7.5.0
    • Component/s: Android
    • Labels:

      Description

      It is not possible to disable a button via it's "enabled" property upon creation on Android:

      var win = Ti.UI.createWindow({
          backgroundColor: '#fff'
      });
       
      var btn = Ti.UI.createButton({
          title: "test",
          enabled: false
      })
       
      btn.addEventListener("click",function() {
          alert("enabled")
      });
       
      win.add(btn);
      win.open();
      

      The button is still clickable and has the default style (touch effect). Using the setEnabled method didn't work either.

      HTC A9, Android 7
      Ti SDK 7.3.1.GA

        Attachments

          Activity

            People

            • Assignee:
              ybanev Yordan Banev
              Reporter:
              michael Michael Gangolf
              Reviewer:
              Joshua Quick
              Tester:
              Samir Mohammed
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code