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

fix(android): fix for changing tabs properties after creation (8_0_X) #10956

Merged
merged 3 commits into from Jun 12, 2019

Conversation

ypbnv
Copy link
Contributor

@ypbnv ypbnv commented Jun 11, 2019

JIRA: https://jira.appcelerator.org/browse/TIMOB-27075

Description:
Cherry pick of: #10950

Fix for changing TabGroup's tabs' properties after they are created. Now every implementation of
AbstractTabGroup must take care of the exposed properties. Improvement of properties handling - they
are now separated for title, tilteColor, background drawable and icon. Imports clean up.

(cherry picked from commit e1ec5e2)
Set the background drawalbe and title color state list only when a new item is added. Then the whole
menu is recreated and some of the properties may get wiped. In other updates use the index property
for updates. Remove one unnecessary line.

(cherry picked from commit 62762f4)
@ypbnv ypbnv added this to the 8.0.2 milestone Jun 11, 2019
@ypbnv ypbnv requested a review from jquick-axway June 11, 2019 13:02
@build build requested a review from a team June 11, 2019 13:29
@build
Copy link
Contributor

build commented Jun 11, 2019

Messages
📖

💾 Here's the generated SDK zipfile.

📖

✅ All tests are passing
Nice one! All 3033 tests are passing.

Generated by 🚫 dangerJS against 0080709

Copy link
Contributor

@jquick-axway jquick-axway 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 June 12, 2019 14:15
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: Able to change tab properties after creation, tested using the following test case:

var win1 = Ti.UI.createWindow({

backgroundColor: 'blue',
title: 'Blue'
});
var button = Ti.UI.createButton({ title: 'Change tab' });
button.addEventListener('click', function () {
tab1.icon = '/images/ChatBadge.png';
tab1.title = 'changed';
});
win1.add(button);
 
var win2 = Ti.UI.createWindow({
backgroundColor: 'red',
title: 'Red'
});
win2.add(Ti.UI.createLabel({ text: 'I am a red window.' }));
 
var tab1 = Ti.UI.createTab({
window: win1,
title: 'Blue'
}),
tab2 = Ti.UI.createTab({
window: win2,
title: 'Red'
}),
tabGroup = Ti.UI.createTabGroup({
tabs: [ tab1, tab2 ]
});
tabGroup.open();

Test Environment

Pixel XL (7.1)
7.0.12-70X.4
Operating System Name: Mac OS Mojave
Operating System Version: 10.14.2
Node.js Version: 8.11.3

@ssjsamir ssjsamir merged commit 9b8617e into tidev:8_0_X Jun 12, 2019
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

4 participants