
Untitled
By: a guest on
May 2nd, 2012 | syntax:
None | size: 0.49 KB | hits: 17 | expires: Never
Add dynamically a Fragment on my Activity
//add a fragment
FluxDetailFragment myFragment = new FluxDetailFragment();
fragmentTransaction.add(R.id.frameLayout3, myFragment);
fragmentTransaction.commit();
02-02 15:34:03.104: E/AndroidRuntime(14794): java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
View result = inflater.inflate(R.layout.view2);
View result = inflater.inflate(R.layout.view2, null);