Fragment 可以说是Android 的 第五大组件了
我们通常用法是 给Framelayout 设置ID ,然后到代码里去进行add 或者replace操作,让Fragment去处理数据
除此之外 还有一种形式就是 在布局里加入该fragment的全类名
<fragment android:id="@+id/fragment" android:name="com.cxh.text.TestFragment" android:layout_width="match_parent" android:layout_height="match_parent" />
进行关联