lrh1993 / livecircle Goto Github PK
View Code? Open in Web Editor NEWLive圈 边学边做,不断完善
Live圈 边学边做,不断完善
那块的代码好多,有点懵
BaseFragment的isFirst字段并没有改动其值啊,麻烦讲解下这个字段的具体用意吧
tab左右来回快速滑动时会闪退,怎么回事啊
我这边运行你的代码貌似并没有实现懒加载的效果。
01-15 01:46:56.315 19110-19110/com.lvr.livecircle D/RecommendFragment: RecommendFragment 可见,并且是第一次加载
01-15 01:46:56.376 19110-19127/com.lvr.livecircle W/EGL_emulation: eglSurfaceAttrib not implemented
01-15 01:46:56.376 19110-19127/com.lvr.livecircle W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xdf3653c0, error=EGL_SUCCESS
01-15 01:46:56.414 19110-19110/com.lvr.livecircle E/RecyclerView: No adapter attached; skipping layout
01-15 01:46:56.481 19110-19110/com.lvr.livecircle E/RecyclerView: No adapter attached; skipping layout
01-15 01:46:56.496 590-611/system_process I/ActivityManager: Displayed com.lvr.livecircle/.home.MainActivity: +216ms
01-15 01:46:56.517 19110-19127/com.lvr.livecircle E/Surface: getSlotFromBufferLocked: unknown buffer: 0xe03792a0
01-15 01:46:56.860 590-936/system_process W/ActivityManager: Duplicate finish request for ActivityRecord{abf9ee9 u0 com.lvr.livecircle/.home.SplashActivity t1285 f}
01-15 01:47:03.501 19110-19110/com.lvr.livecircle D/RecommendFragment: RecommendFragment 可见,并且是第一次加载
01-15 01:47:03.501 19110-19110/com.lvr.livecircle D/NewsFragment: newsfragment 可见,并且是第一次加载
第一条日志是进去后打印出来的,这里没问题,并没有预加载。但是点击第二个fragment时,下面一个fragment的onFragmentVisibleChange还是执行了,第三个fragment的代码也打印出来了,这不算懒加载吧
你将接口请求放在了setUserVisibleHint()方法中。此时,fragment还没有执行onCreateView()。如果你得接口访问很快,然而布局文件还没有初始化,。在给控件赋值时会报错
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.