Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 2nd, 2012  |  syntax: None  |  size: 0.49 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Add dynamically a Fragment on my Activity
  2. //add a fragment
  3. FluxDetailFragment myFragment = new FluxDetailFragment();
  4. fragmentTransaction.add(R.id.frameLayout3, myFragment);
  5. fragmentTransaction.commit();
  6.        
  7. 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.
  8.        
  9. View result = inflater.inflate(R.layout.view2);
  10.        
  11. View result = inflater.inflate(R.layout.view2, null);