Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-25503] Android: Fix CardView template compatibility #10045

Merged
merged 4 commits into from May 18, 2018

Conversation

garymathews
Copy link
Contributor

@garymathews garymathews commented May 14, 2018

  • Fix ability to use Ti.UI.Android.CardView in Ti.UI.ListView templates
TEST CASE
var win = Ti.UI.createWindow({
        backgroundColor: 'gray'
    }),
    listView = Ti.UI.createListView({
        templates: {
            test: {
                childTemplates: [{
                    type: 'Ti.UI.Android.CardView',
                    childTemplates: [{
                        type: 'Ti.UI.Label',
                        bindId: 'label',
                        properties: {
                            color: 'black',
                            bindId: 'label'
                        }
                    }],
                    properties: {
                        width: Ti.UI.FILL,
                        height: Ti.UI.SIZE,
                        cardUseCompatPadding: true,
                        backgroundColor: 'white',
                        layout: 'vertical'
                    }
                }]
            }
        },
        defaultItemTemplate: 'test'
    }),
    section = Ti.UI.createListSection(),
    items = [];

['A', 'B', 'C'].forEach((item) => items.push({
    label: { text: item },
    template: 'test'
}));

section.setItems(items);
listView.setSections([ section ]);
win.add(listView);
win.open();

JIRA Ticket

@sgtcoolguy sgtcoolguy modified the milestones: 7.2.0, 7.3.0 May 16, 2018
Copy link
Contributor

@ypbnv ypbnv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ssjsamir ssjsamir self-requested a review May 17, 2018 19:00
Copy link
Contributor

@ssjsamir ssjsamir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FR Passed: Application no longer crashed when trying to use Ti.UI.Android.CardViewin Ti.UI.ListView templates
Test steps

  • Created a build from this PR
  • Created a titanium app
  • Added the test case above
  • Ran the program
  • Able to see the view without any issues

Test Environment
APPC Studio: 5.0.0.201712081732
APPC CLI: 7.0.3
Google Pixel (8.1.0)
Operating System Name: Mac OS High Sierra
Operating System Version: 10.13
Node.js Version: 8.9.1
Xcode 9.2

@build
Copy link
Contributor

build commented May 17, 2018

Messages
📖

💾 Here's the generated SDK zipfile.

Generated by 🚫 dangerJS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants