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

Android: CardView "touchFeedbackColor" property is ignored

    Details

    • Story Points:
      5

      Description

      Summary:
      The Ti.UI.Android.CardView has always ignored the "touchFeedback" and "touchFeedbackColor" properties and would never show a ripple effect. Now that Titanium 10.x.x uses the Java MaterialCardView widget, we shouldn't ignore these properties anymore because this native "material" widget shows a ripple effect by default.

      Steps to reproduce:

      1. Build and run the below on Android.
      2. Tap on the card view in the app.
      3. Notice the ripple effect is gray and not yellow. (This is the bug.)

      const window = Ti.UI.createWindow();
      const cardView = Ti.UI.Android.createCardView({
      	elevation: 20,
      //	touchFeedback: false,
      	touchFeedbackColor: "yellow",
      	top: "20dp",
      	left: "20dp",
      	bottom: "20dp",
      	right: "20dp",
      });
      cardView.add(Ti.UI.createLabel({
      	text: 'Tap Me',
      	touchEnabled: false,
      }));
      window.add(cardView);
      window.open();
      

      Note:
      As of Titanium 10.0.0, setting the "touchFeedback" and "touchFeedbackColor" properties causes the following warning message to be logged. We should resolve this issue too.

      [INFO]  MaterialCardView: Setting a custom background is not supported.
      

      Work-Around:
      Add a view to the CardView and set it up with touch feedback.

        Attachments

          Activity

            People

            • Assignee:
              jquick Joshua Quick
              Reporter:
              jquick Joshua Quick
              Reviewer:
              Gary Mathews
            • 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 Integration