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

Android: Aliasing occurs on a view if border width is set to anything less than the entire height or width

    Details

      Description

      Issue

      When a view has borderWidth set to anything that is less than the view's height and width there is an aliasing that can seen on the view's borders.

      Steps to Reproduce

      Please run the sample code below:

       
      var win = Ti.UI.createWindow({
          backgroundColor : 'white'
      });
      win.open();
      var self = Ti.UI.createView();
      win.add(self);
      var loadingIndicatorView = Ti.UI.createView({
          backgroundColor : 'black',
          borderColor : 'black',
          borderWidth : 2,
          opacity : .6,
          top : 5,
          width : 52,
          height : 52,
          borderRadius : 52,
          zIndex : 1,
      });
       
      var smallView = Ti.UI.createView({
          width : 10,
          height : 10,
          backgroundColor : 'red'
      });
      loadingIndicatorView.add(smallView);
      self.add(loadingIndicatorView);
       
      loadingIndicatorView.show();
       
      var button = Ti.UI.createButton({
          title : 'Hello',
          width : 200,
          height : 100,
          top : 250
      });
       
      var show = false;
       
      win.add(button);
      button.addEventListener('click', function(e) {
          if (show) {
              loadingIndicatorView.show();
              show = false;
          } else {
              show = true
              loadingIndicatorView.hide();
       
          }
      });
      
      

      Notice the aliasing around the borders in the screenshot taken after running the above code.

      This issue relates to http://jira.appcelerator.org/browse/TIMOB-11020 that was just fixed.

      For aliasing to not happen, in 2.1.2.GA if we just set the borderWidth same as height and width of the view i.e 52, it would work fine. But in 2.1.3.RC, this does not work.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vduggal Vishal Duggal (Inactive)
                Reporter:
                vjoshi Varun Joshi
                Reviewer:
                Allen Yeung
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration