| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| super.initNativeView(); | ||
| this._isClickable = this.nativeViewProtected.isClickable(); | ||
|
|
||
| this.setOnLayoutChangeListener(); |
There was a problem hiding this comment.
We should create a LayoutChangeListener only if someone has attached to this event. Currently listeners will be created for all views and will be triggered unnecessary.
We are doing something similar with the touch listener here. For the onLayout we should probably override another method as it is not attached trough observe() (observe is for gestures). Probably on()/off() events
Sorry, something went wrong.
| newPage.content = stackLayout; | ||
|
|
||
| TKUnit.waitUntilReady(() => stackLayoutChanged && buttonLayoutChanged); | ||
| TKUnit.assert(stackLayoutChanged); |
There was a problem hiding this comment.
Not sure we need those explicit asserts -- waitUnitlReady(...) on previous line will time out if those booleans are not true.
Sorry, something went wrong.
There was a problem hiding this comment.
I'm not sure too.
We do it in other tests
Sorry, something went wrong.
|
#5687 says that the main use case is to be able to use getActualSize() and be sure values are correct -- shouldn't we add a test for this? |
Sorry, something went wrong.
|
|
||
| on(eventNames: string, callback: (data: EventData) => void, thisArg?: any) { | ||
| super.on(eventNames, callback, thisArg); | ||
| const isLayoutEvent = typeof eventNames === "string" ? eventNames.indexOf(ViewCommon.layoutChangedEvent) !== -1 : false; |
There was a problem hiding this comment.
"string" ? -- two spaces instead of one.
Sorry, something went wrong.
| super.initNativeView(); | ||
| this._isClickable = this.nativeViewProtected.isClickable(); | ||
|
|
||
| if (this.hasListeners(ViewCommon.layoutChangedEvent)) { |
There was a problem hiding this comment.
I think we need to check for !this.layoutChangeListenerIsSet here?
Sorry, something went wrong.
There was a problem hiding this comment.
It should not be possible to initNativeView twice without disposeNativeView
Sorry, something went wrong.
…m OnLayoutChangeListener
|
test |
Sorry, something went wrong.
|
test |
Sorry, something went wrong.
I've talked with the runtime guys and the way we use the listener is ok
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
LayoutChanged event should be invoked when the layout bounds of a view changes.
Fix #5687