fragment 切换

1.Fragment的添加方式

FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.hide
ft.show
ft.add
ft.replace
ft.hide---ft.show
a.let the old fragment to hide, but not delete in memory, so it will quick showing after calling show
b.when calling ft.replace it will delete all old memory, and it will onCreateView for a new time when show this.
c.ft.add it using with ft-hide/ft.show, not delete fragment in memory.
d.ft.remove sync using with ft.add. just remove what you want .
上一篇:自然语言处理中的Attention Model:是什么及为什么


下一篇:python之对字符串类型的数组求平均值