You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by GitBox <gi...@apache.org> on 2019/12/18 08:59:46 UTC

[GitHub] [incubator-weex] wangxiongtao commented on issue #3088: [Android]怎么实现tab组件页面的切换,而不是滑动,现在我用v-if来隐藏显示每个组件,但是每次显示都会重新加载一遍组件,而不能缓存之前的组件,请问我该怎么实现类似Android中Fragment切换的效果

wangxiongtao commented on issue #3088: [Android]怎么实现tab组件页面的切换,而不是滑动,现在我用v-if来隐藏显示每个组件,但是每次显示都会重新加载一遍组件,而不能缓存之前的组件,请问我该怎么实现类似Android中Fragment切换的效果
URL: https://github.com/apache/incubator-weex/issues/3088#issuecomment-566940002
 
 
   > 感谢你的反馈,Weex目前是隶属于Apache Software Foundation的项目,因此在Gtihub渠道我们鼓励使用英文反馈问题。下面我将使用Google Trasnlate将你的问题翻译成英语,并以英语回答。
   > 
   > > Question:  How to switch the tab component page instead of sliding. Now I use v-if to hide and display each component, but each time the display will reload the component instead of caching the previous component, how can I achieve similar to Android Fragment switching effect
   > 
   > 1. Normally, `v-if` will trigger `addView` and `removeView` in Android Platform.
   > 2. You can take a look at our [code demo](https://weex.apache.org/community/code-demos.html), where `<recycle-list> infinite scroll` may be what you want.
   v-if will trigger addView and removeView,so how can I control the display and hide of a component correctly
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services