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

Android: Alignment Issues on Android, layout appears broken

    Details

    • Story Points:
      2

      Description

      8 Buttons are added to the window, and have a background image. When they are aligned together in a line, it appears broken. It looks continuous on iOS.

      I have attached images to explain this. Also have included the code sample.

      var  win = Titanium.UI.createWindow({
                          backgroundColor:'white',
                          title:'window',
                          barColor:'#ff7b01',
                          top:0
                      });
          var arr = ['5d', '1m', '3m', '6m', 'YTD', '1yr', '2yr', '4yr'];
          for(var i=0;i<arr.length;i++){
              win.add(createDateButtons(i,12));
          }   
       
        function createDateButtons(_index, _btnWidth) {
              var imageColViewOn1 = Ti.UI.createButton({
                  title : arr[_index],
                  width : _btnWidth + '%',
                  height : 40,
                  top : 14,
                  left :(_btnWidth * _index ) + '%', /* 2.8% + the calculated width X index # */
                  font : {
                      fontSize : 13,
                      fontWeight : 'bold',
                      fontFamily : 'Helvetica Neue'
                  },
                  color : 'yellow',
                  backgroundImage:'red.jpeg'
              });
       
              return imageColViewOn1;
          };
       
      win.open();
      

        Attachments

          Activity

            People

            • Assignee:
              ayeung Allen Yeung
              Reporter:
              dgandhi Devang Gandhi
            • Watchers:
              0 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code