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

Android: Border Radius once set on a view cannot be reset( i.e. set to 0)

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Release 8.1.0, Release 8.2.0, Release 8.1.1
    • Fix Version/s: None
    • Component/s: None
    • Environment:

      This bug was found on Ti SDK 8.0.2.GA. On an Android device running Oreo.

      Description

      var win = Ti.UI.createWindow({
          backgroundColor: 'black',
      });
       
      var vw_main = Ti.UI.createView({
          left: 0,
          top: 0,
          width: '100%',
          height: '100%',
          layout: 'vertical',
      });
      win.add(vw_main);
       
       
      var vw_rect1 = Ti.UI.createView({
          top: 20,
          width: 200,
          height: 300,
          borderRadius: 20,
          backgroundColor: 'red',
      });
      vw_main.add(vw_rect1);
       
      var checkBox = Ti.UI.createSwitch({
          top: 10,
          value: true,
          style: Titanium.UI.Android.SWITCH_STYLE_CHECKBOX,
          title: 'Border Radius is enabled',
      });
      vw_main.add(checkBox);
       
      checkBox.addEventListener('change', function (e) {
          if (e.value) {
              vw_rect1.borderRadius = 20;
              checkBox.title = "Border Radius is enabled";
          }
          else {
              vw_rect1.borderRadius = 0;
              //vw_rect1.borderRadius = 0.1; //Current Workaround
              checkBox.title = "Border Radius is not enabled";
          }
      });
       
      win.open();
      

      Currently as a workaround I am setting the borderRadius to 0.1 instead of 0.

        Attachments

          Activity

            People

            • Assignee:
              gmathews Gary Mathews
              Reporter:
              pritish.george pritish.george
            • Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration