片段中的onCreateView()从未调用过?

时间:2014-02-03 09:41:17

标签: android android-fragments

我有双窗格布局,适用于平板电脑。但是在手机详细信息片段的onCreateView永远不会被调用。有什么原因吗?



       vehicleInfoFragment = new VehicleInfoDetailsFragment();
    Intent i = this.getIntent();
    index = i.getExtras().getInt(INDEX_LABEL, 0);
    getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, vehicleInfoFragment).commit();
    vehicleInfoFragment.populateRouteDetails(index);

0 个答案:

没有答案