当一个而在存在多个fragment并要切换时,fragment 会多次重复加载,怎么解决呢,大概思路是当滑动到当前页面的时候把你要显示的show就行了.
`
要使用到的两个方法如下:
getSupportFragmentManager().beginTransaction()
.hide(promotionF).hide(promoteSpotF)
.add(id.container_lyt, promoteAwardF).commit();
getSupportFragmentManager().beginTransaction()
.hide(promotionF).hide(promoteAwardF).show(promoteSpotF)
.commit();
}