Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27258] Android: Background Gradient does not work on Ti.UI.Android.CardView

GitHub Issuen/a
TypeBug
PriorityHigh
StatusIn Review
ResolutionUnresolved
Affected Version/sRelease 8.2.0, Release 8.1.1
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterHans Knöchel
AssigneeYordan Banev
Created2019-07-19T13:43:00.000+0000
Updated2019-09-16T14:15:42.000+0000

Description

Our CI highly relies on card-views to create well-shaped rounded views with a background gradient. Unfortunately, this does not work on Android:
var win = Ti.UI.createWindow();

var cardView = Ti.UI.Android.createCardView({
    width: 200,
    height: 200,
    backgroundGradient: {
        type: 'linear',
        colors: ['#6AECD5', '#50DBB8'],
        startPoint: { x: '50%', y: 0 },
        endPoint: { x: '50%', y: '100%' },
        backFillStart: false
    }
});

win.add(cardView);
win.open();
It works fine on iOS and other views like Ti.UI.View or Ti.UI.Button, but those cannot be used because of the rounded / shadowed combination.

Comments

  1. Hans Knöchel 2019-09-10

    Is there progress or at least a workaround regarding this issue?
  2. Yordan Banev 2019-09-16

    PR: https://github.com/appcelerator/titanium_mobile/pull/11219

JSON Source