Uploaded image for project: 'Documentation'
  1. Documentation
  2. TIDOC-3211

Android CardView example code uses deprecated APIs

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: No Release
    • Component/s: APIDoc
    • Labels:
      None
    • Sprint:
      Sprint 20 2018 - Avengers

      Description

      Summary:
      The CardView documentation's example code uses deprecated APIs contentPadding, cardCornerRadius, and cardUseCompatPadding. These properties no longer do anything.

      Recommended Example Code:

      var win = Ti.UI.createWindow({
      	title: 'Card Demo'
      });
      var scrollView = Ti.UI.createScrollView({
      	layout: 'vertical'
      });
      for (var index = 1; index <= 10; index++) {
      	var cardView = Ti.UI.Android.createCardView({
      		layout: 'vertical',
      		padding: '16dp',
      		top: '10dp',
      		left: '10dp',
      		right: '10dp',
      	});
      	cardView.add(Ti.UI.createLabel({
      		text: 'Card ' + index,
      		maxLines: 1,
      		font: {
      			fontSize: '20dp',
      			fontWeight: 'bold'
      		},
      		width: Ti.UI.FILL
      	}));
      	cardView.add(Ti.UI.createLabel({
      		text: 'This is the card view description text.\nThis is the 2nd line of text.',
      		textAlign: Ti.UI.TEXT_ALIGNMENT_LEFT,
      		width: Ti.UI.FILL
      	}));
      	scrollView.add(cardView);
      }
      win.add(scrollView);
      win.open();
      

      Note:
      We need to avoid using property borderRadius in new example code until bug TIMOB-26187 has been fixed. I recommend that we stick to the default border radius used by Google.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jquick Joshua Quick
                Reporter:
                jquick Joshua Quick
                Reviewer:
                (deactived) Brian Immel (Inactive)
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code