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-18744] Android: setting touchEnabled true by default #8033

Merged
merged 2 commits into from Jun 1, 2016

Conversation

ashcoding
Copy link
Contributor

https://jira.appcelerator.org/browse/TIMOB-18744

Test Code:-

var win = Titanium.UI.createWindow({
    title : 'Tab 1',
    backgroundColor : '#fff',
    layout:"vertical"
});

// Create a Button.
var save = Ti.UI.createButton({
    title : 'save',
    height : Ti.UI.SIZE,
    width : Ti.UI.SIZE,
    top : 30,
});



// Listen for click events.
save.addEventListener('click', function(e) {
    alert('touchEnabled = ' + typeof (e.source.touchEnabled) + ' ; value = ' + e.source.touchEnabled);
});

// Create a Label.
var testlabel = Ti.UI.createLabel({
    text : 'testlabel',
    color : '#000',
    font : {
        fontSize : 40
    },
    height : Ti.UI.SIZE,
    width : Ti.UI.SIZE,
    top : 50,

});

// Listen for click events.
testlabel.addEventListener('click', function(e) {
    alert('touchEnabled = ' + typeof (e.source.touchEnabled) + ' ; value = ' + e.source.touchEnabled);
});

// Add to the parent view.


var view = Ti.UI.createView({
    width : 100,
    height : 50,
    backgroundColor : 'red',
    top:20

});

// Listen for click events.
view.addEventListener('click', function(e) {
    alert('touchEnabled = ' + typeof (e.source.touchEnabled) + ' ; value = ' + e.source.touchEnabled);
});

// Add to the parent view.
win.add(testlabel);
win.add(view);
win.add(save);

win.open();

@@ -70,7 +70,7 @@
"softKeyboardOnFocus", "transform", "elevation", "touchTestId",
"translationX", "translationY", "translationZ",

TiC.PROPERTY_TRANSITION_NAME
TiC.PROPERTY_TRANSITION_NAME, TiC.PROPERTY_TOUCH_ENABLED
Copy link
Contributor

Choose a reason for hiding this comment

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

"touchEnabled" should already be an accessor, look at line 69

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it.

@hieupham007
Copy link
Contributor

Code reviewed. Left a comment

@ashcoding
Copy link
Contributor Author

Addressed comment.

@hieupham007
Copy link
Contributor

Code reviewed and tested. Looks good.

@hieupham007 hieupham007 merged commit c012548 into tidev:master Jun 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants