You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Android] View._onDetached called twice when app is suspended. #1543
Hi, I wondered if this is intended? To reproduce :
just add listview with content
I add console.log in listview-android
public _onDetached(force?: boolean) {
console.log('detached');
}
and when we click back button on android (to go to home screen), it will called twice. I dont know about iOS since going to home screen seems not doing suspending/ quitting
btw using back button in android seems still retain all the previous values in the javascript ? So the activity is not recreated (at least the javascript) ?
@x4080 I tried what you described and _onDetached was called once. I also tried navigating forward from a page that contains a ListView and it was also called only once. I can't reproduce this. Can you send me a small sample app that does exhibit this behavior. Thanks.
changed the title [-]listview _onDetached called twice (android)[/-][+][Android] View._onDetached called twice when app is suspended.[/+]on Feb 22, 2016
Activity
hamorphis commentedon Feb 17, 2016
We are aware of this. It is a private method though. What is the scenario that you are trying to achieve?
x4080 commentedon Feb 18, 2016
I was creating custom component based on listview
hamorphis commentedon Feb 18, 2016
@x4080 OK. I will see whether I can fix this in a neat way. Stay tuned.
x4080 commentedon Feb 18, 2016
cool
hamorphis commentedon Feb 19, 2016
@x4080 I tried what you described and _onDetached was called once. I also tried navigating forward from a page that contains a ListView and it was also called only once. I can't reproduce this. Can you send me a small sample app that does exhibit this behavior. Thanks.
x4080 commentedon Feb 19, 2016
What i did was exit the app with backspace. Sorry if im not describing it completely.
[-]listview _onDetached called twice (android)[/-][+][Android] View._onDetached called twice when app is suspended.[/+]Fixed Issue #1543: View._onDetached called twice when app is suspended.
Merge pull request #1605 from NativeScript/on-detached
x4080 commentedon Mar 19, 2016
Hi, just wanted you guys to know that this problem still persists in 1.6 it will be fix in 1.7 ?
lock commentedon Aug 30, 2019
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.