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-19035] Android: Fix Ti.UI.SIZE height on Ti.UI.ScrollableView #9192

Merged
merged 4 commits into from Jul 6, 2017

Conversation

garymathews
Copy link
Contributor

  • Guard against null height property
TEST CASE
var win = Ti.UI.createWindow({
        backgroundColor: 'white',
        layout: 'vertical'
    }),
    lbl_a = Ti.UI.createLabel({
        text: 'View A',
        height: Ti.UI.SIZE
    }),
    lbl_b = Ti.UI.createLabel({
        text: 'View B',
        height: 100
    }),
    view_a = Ti.UI.createView({
        backgroundColor: 'red',
        height: 100,
        width: '90%'
    }),
    view_b = Ti.UI.createView({
        backgroundColor: 'green',
        height: Ti.UI.SIZE,
        width: '90%'
    }),
    scrollable = Ti.UI.createScrollableView({
        views: [view_b, view_a],
        width: Ti.UI.FILL,
    	height: Ti.UI.SIZE,
    	top: '30dip'
    });

view_a.add(lbl_a);
view_b.add(lbl_b);

win.add(scrollable);
win.open();

JIRA Ticket

@garymathews garymathews added this to the 6.2.0 milestone Jul 4, 2017
@garymathews garymathews requested a review from ypbnv July 4, 2017 11:40
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.

CR: Pass

@ssjsamir ssjsamir self-requested a review July 6, 2017 18:33
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 crashes and can now guard against null height property.

Test Steps

  • Downloaded the SDK Build form this PR
  • Created a new Titanium project
  • Copied the the test case from description
  • Ran the application
  • Application no longer crashed

Test Environment
Appcelerator Command-Line Interface, version 6.2.2
Google Nexus 6P (7.1.1)
Operating System Name: Mac OS X El Capitan
Operating System Version: 10.11.6
Node.js Version: 6.10.1
Xcode: 8.2
Appcelerator Studio: 4.9.0.201705251638

@ssjsamir ssjsamir merged commit fdd07e7 into tidev:master Jul 6, 2017
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

3 participants