-5
我想将my_fragment1实现为tab1片段如何将片段组合成片段。如何将片段添加到片段中
TAB1
public class Tab1 extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.tab1, container, false);
list_fragment fm = (list_fragment)getActivity().getSupportFragmentManager().findFragmentById(R.id.My_Container_1_ID);
}
Tab1.xml
<FrameLayout
android:id="@+id/My_Container_1_ID"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_alignParentTop="true"
android:layout_toLeftOf="@+id/button"
android:layout_toStartOf="@+id/button">
</FrameLayout>
不能添加片段插入片段使用活动并更换fragmnet – Vadivel
我们可以使用多个片段活动 – Vadivel
因为在我的情况下,我使用NID使用刷卡标签,所以,倾斜在活动实施 –