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

是修改了Navigation使它支持Fragment复用吗? #12

Closed
ppg408331701 opened this issue Jun 2, 2020 · 5 comments
Closed

是修改了Navigation使它支持Fragment复用吗? #12

ppg408331701 opened this issue Jun 2, 2020 · 5 comments

Comments

@ppg408331701
Copy link

ppg408331701 commented Jun 2, 2020

原版的Navigation我知道会每次都销毁View。很蛋疼

那么框架内的FragmentNavigator 就是重写了replace的逻辑,变成了show和hide的吧

里面是否有用到反射?我担心如果用了反射以后谷歌一刀切不允许反射了出问题

@ppg408331701 ppg408331701 changed the title 是修改了Navigation是它支持Fragment复用吗? 是修改了Navigation使它支持Fragment复用吗? Jun 2, 2020
@hegaojian
Copy link
Owner

就是重写了他的replace的逻辑而已,没有用到反射

@ppg408331701
Copy link
Author

非常感谢,我可以放心的用了。

另外,你的头像还有更高清的图吗?看见一次想笑一次。。

附上之前出现的内存泄漏的信息。出现了4次,大部分都是点击home键退回到桌面时出现的

┬───
│ GC Root: Global variable in native code

├─ android.app.Activity$1 instance
│ Leaking: UNKNOWN
│ Anonymous subclass of android.app.IRequestFinishCallback$Stub
│ ↓ Activity$1.this$0
│ ~~~~~~
╰→ leakcanary.internal.activity.LeakActivity instance
​ Leaking: YES (ObjectWatcher was watching this because leakcanary.internal.activity.LeakActivity received Activity#onDestroy() callback and Activity#mDestroyed is true)
​ key = c7f26b45-48fa-4236-855c-bb006b8050d7
​ watchDurationMillis = 5231
​ retainedDurationMillis = 198

METADATA

Build.VERSION.SDK_INT: 29
Build.MANUFACTURER: Xiaomi
LeakCanary version: 2.2
App process name: me.hgj.jetpackmvvm.demo
Analysis duration: 5153 ms

@hegaojian
Copy link
Owner

你嗦的是哪个头像啊,我GitHub的头像还是App中的 😆

@ppg408331701
Copy link
Author

当然是 鸡你太美

@hegaojian
Copy link
Owner

下版更新的时候我换个高清点的头像 😊 ,那个内存泄漏问题还在排查,后面找到原因了给他修复掉

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

No branches or pull requests

2 participants