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

CardView: contentPadding(X) and cardCornerRadius should use default unit

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 5.1.2
    • Component/s: Android
    • Labels:
      None
    • Environment:

      SDK 5.1.0.v20151019145227

      Description

      The following sample and attached screenshot demonstrate that the 5 contentPadding properties and cardCornerRadius do not use the default unit but are a Number used with px.

      It should use the default unit like all views.

      var win = Ti.UI.createWindow({
      	layout: 'vertical'
      });
       
      var card = Ti.UI.Android.createCardView({
      	top: 20,
      	left: 20,
      	right: 20,
       
      	contentPadding: 20,
      	cardCornerRadius: 20
      });
       
      card.add(Ti.UI.createLabel({
      	text: 'PADDING AND TEXT NOT AS EXPECTED',
      	color: '#000'
      }));
       
      win.add(card);
       
      var card = Ti.UI.Android.createCardView({
      	top: 20,
      	left: 20,
      	right: 20,
      	
      	contentPaddingBottom: 20,
      	contentPaddingLeft: 20,
      	contentPaddingRight: 20,
      	contentPaddingTop: 20,
      	cardCornerRadius: 20
      });
       
      card.add(Ti.UI.createLabel({
      	text: 'PADDING AND TEXT NOT AS EXPECTED',
      	color: '#000'
      }));
       
      win.add(card);
       
      var view = Ti.UI.createView({
      	top: 20,
      	left: 20,
      	right: 20,
       
      	height: Ti.UI.SIZE,
       
      	borderRadius: 20,
       
      	backgroundColor: 'white'
      });
       
      view.add(Ti.UI.createLabel({
      	top: 20,
      	right: 20,
      	bottom: 20,
      	left: 20,
       
      	height: Ti.UI.SIZE,
       
      	text: 'PADDING & RADIUS AS EXPECTED',
      	color: '#000'
      }));
       
      win.add(view);
       
      win.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                msamah Ashraf Abu (Inactive)
                Reporter:
                fokkezb Fokke Zandbergen
                Reviewer:
                Srikanth Sombhatla (Inactive)
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration