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-10712] Android: label 'opacity' property won't change for TableVi... #3043
Conversation
…eViewRows outside the visible screen on touch event
I can see that this change breaks "old style" rows -- a fix for that is in progress and will be added here. |
…eViewRows outside the visible screen on touch event
There's another change for old-style rows coming here. |
…eViewRows outside the visible screen on touch event
@@ -124,7 +125,7 @@ protected void refreshControls() | |||
if (view == null) { | |||
// In some cases the TiUIView for this proxy has been reassigned to another proxy | |||
// We don't want to actually release it though, just reassign by creating a new view | |||
view = proxy.forceCreateView(); | |||
view = proxy.forceCreateView(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use a comment here as to why it's not setting the model listener.
Functional test passes. Also tested table view examples in KitchenSink to look for regressions but it seemed fine. Left comments for review. Also, I'll get a second reviewer on this after the next round of changes. I think any somewhat-major change to TableView should have two reviewers. |
From what we talked about it seemed like you moved the code to associate a proxy to a view from refreshControls() to onLayout() so that it would not occur during measure passes, but we still have a lot of logic inside refreshControls() like calling processProperties(). Do we still need this during a measure pass, or should that be moved as well? Also, the test case should include the old style rows test case too since you added logic for that. |
Yes I agree with your summary of the situation. refreshControls() is a poorly named method in this I'm going to rename it to something like Karl From: ayeung <notifications@github.commailto:notifications@github.com> From what we talked about it seemed like you moved the code to associate a proxy to a view from refreshControls() to onLayout() so that it would not occur during measure passes, but we still have a lot of logic inside refreshControls() like calling processProperties(). Do we still need this during a measure pass, or should that be moved as well? Also, the test case should include the old style rows test case too since you added logic for that. — |
Thanks for the comments, they are all good ones and I'll address them. I'm looking for more test cases for all of this. Arthur Evans found one by
From: Bill Dawson <notifications@github.commailto:notifications@github.com> Functional test passes. Also tested table view examples in KitchenSink to look for regressions but it seemed fine. Left comments for review. Also, I'll get a second reviewer on this after the next round of changes. I think any somewhat-major change to TableView should have two reviewers. — |
…eViewRows outside the visible screen on touch event
OK I've updated code to respond to comments. |
// We don't want to actually release it though, just reassign by creating a new view. | ||
// Not setting modelListener from here because this could be a measurement pass or | ||
// a layout pass through getView(). | ||
view = proxy.forceCreateView(false); // false means don't set modelListener |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use a more detailed comment regarding why we are not setting the model listener here. Since this is a complex bug, we should probably put some comments in relevant places like getView() to describe the situation.
Code reviewed. please address comments. |
…eViewRows outside the visible screen on touch event
OK, I addressed comments from Allen. |
Hi there...I submitted the original bug for GameStop. Now when I build the sdk manually using scons, the bug seems to be fixed, but now the images don't show up...see example code http://jira.appcelerator.org/browse/TIMOB-10712 This is the error I see in logcat: E/TiDownloadManager( 5900): (pool-3-thread-2) [0,1970] Exception downloading https://github.com/appcelerator/titanium_mobile/raw/master/demos/KitchenSink/Resources/images/custom_tableview/eventsButton.png |
It's working for me right now. I"m wondering if the errors above for kitchen sink images were due to a server problem. Anyway, I"m eager to get this pull request merged. |
Are you testing on a device or the emulator? I am on a device, but if the images are showing for you then maybe it is a server issue or something weird with the Ti response cache on my device. |
I"m testing using a device -- Samsung Galaxy S2 (AT&T), Android 2.3.6 |
FYI...I just pulled down the latest from timob-10712-2 and built it and the bug fix doesn't work anymore. Should I be pulling from a different branch now? |
Nevermind...for some reason Ti Studio changed my Ti SDK back to 2.1.2GA |
// Create views for measurement or for layout. For each view, apply the | ||
// properties from the appropriate proxy to the view. | ||
// | ||
protected void createViews() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
createView seems a little generic for the context of the table view, maybe we can use something like createControls() so it aligns with terminology in this class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem I have with this is that "controls" is confusing here.
The name createViews() describes pretty well what is going on
underneath.
Karl
From: ayeung <notifications@github.commailto:notifications@github.com>
Reply-To: appcelerator/titanium_mobile <reply@reply.github.commailto:reply@reply.github.com>
Date: Sat, 29 Sep 2012 12:32:26 -0700
To: appcelerator/titanium_mobile <titanium_mobile@noreply.github.commailto:titanium_mobile@noreply.github.com>
Cc: Karl Rowley <krowley@appcelerator.commailto:krowley@appcelerator.com>
Subject: Re: [titanium_mobile] [TIMOB-10712] Android: label 'opacity' property won't change for TableVi... (#3043)
In android/modules/ui/src/java/ti/modules/titanium/ui/widget/tableview/TiTableViewRowProxyItem.java:
@@ -97,7 +98,11 @@ protected TiViewProxy addViewToOldRow(int index, TiUIView titleView, TiViewProxy
return label;
}
protected void refreshControls()
//
// Create views for measurement or for layout. For each view, apply the
// properties from the appropriate proxy to the view.
//
protected void createViews()
createView seems a little generic for the context of the table view, maybe we can use something like createControls() so it aligns with terminology in this class?
—
Reply to this email directly or view it on GitHubhttps://github.com//pull/3043/files#r1723800.
|
||
public void realizeViews(TiUIView view) | ||
public void realizeViews(TiUIView view, boolean isLayoutPass) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename isLayoutPass
Code reviewed, left several comments. |
…eViewRows outside the visible screen on touch event -- Address code review comments
Code reviewed. Request Accepted |
This PR breaks KitchenSink. (KitchenSink crashes immediately on opening.) When we make "big" changes to something that is also used in KitchenSink, we also test KS before submitting a PR, as a kind of "smoke test" beyond the test case in the individual JIRA ticket. It's a good habit to get into. |
I'm not seeing failures in Kitchen Sink so far. What is the stack trace you are seeing for the Kitchen Sink crash? |
Uh oh, hopefully I'm not leading us on a wild goose chase. I'll try again. On Tue, Oct 2, 2012 at 7:21 PM, krowley notifications@github.com wrote:
Bill Dawson bdawson@appcelerator.com Appcelerator, Inc. |
Code reviewed without comments. Waiting on further update following Bill's feedback |
KS is fine. I wonder if maybe I accidentally pulled in your "timob-10712" rather than "timob-10712-2" branch yesterday. Not sure what happened. Resuming review.... |
CR Accepted Leaving FR to Allen and Bill. Merge approved once FR from Bill/Allen passes. |
CR/FR accepted. Thank you especially for the code commenting. For FR, I re-tested the fail case, went through KS tableview tests and made my own test app to check proxy property values while scrolling through the table. |
[TIMOB-10712] Android: label 'opacity' property won't change for TableVi...
...ewRows outside the visible screen on touch event
Re-factor code so that view-proxy associations are only made at layout time, but not
during any non-layout passes through getView() (i.e. measurement passes).
Needs review by Opie -- Thanks!