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

detach the view from the parent before adding to borderView #3752

Merged
merged 2 commits into from Jan 28, 2013

Conversation

salachi
Copy link
Contributor

@salachi salachi commented Jan 22, 2013

TIMOB-12134 - If the view already has a parent, we need to detach it before adding to the borderView. borderView is then added to the original parent.

@ayeung
Copy link
Contributor

ayeung commented Jan 24, 2013

A couple of things:

  1. Please format your code with the eclipse profile I have sent you earlier (just the code snippet, not the whole file)
  2. Please also put the TIMOB number in the git commits.
  3. I investigated on the root cause of this problem. It looks like the process properties is not happening before we add the window to the tab group. I made a change like http://pastie.org/private/6zcqzoosqnz21b09bhztg, and it seems to resolve the issue since we are forcing the border view to get created first before we add anything. I haven't done thorough testing on this though, but maybe you could take a look at see if there are any regressions when doing a KS run. I believe your change fixes the issue, but I'd prefer to prevent this scenario from occurring instead of fixing it after it occurs.

@ayeung
Copy link
Contributor

ayeung commented Jan 24, 2013

Actually my fix may not be ideal since it blocks the runtime thread, which may cause a small performance hit. We can probably your solution. I'll review the code now.

borderView.addView(nativeView, params);
if (savedParent != null) {
if (savedLayoutParams != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably don't need to check for null on savedLayoutParams, native android already handles this.

@ayeung
Copy link
Contributor

ayeung commented Jan 24, 2013

Code reviewed, please address comments.

@ayeung
Copy link
Contributor

ayeung commented Jan 28, 2013

Code reviewed and functionally tested. Request Accepted

ayeung pushed a commit that referenced this pull request Jan 28, 2013
detach the view from the parent before adding to borderView
@ayeung ayeung merged commit 7510c78 into tidev:master Jan 28, 2013
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