Display a Fragment element inside a Dialog element
===

In my app the same functionality should be shared between different device-oriented layouts. For handsets, I've got an activity for performing some transactions - simultaneously I've got to implement the same functionality within a popup for tablet version.

So far I've tried putting fragment into dialog both ways: statically and dynamically. When I do it statically it moans about duplicate ID and I guess this means that Fragment is already created. On the other hand when I try to implement it dynamically it says that there's no view for the fragment. I do it like this: 

    	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(_layoutResID);
		

	}
	
	@Override
		public void show() {
			super.show();
			FragmentManager fragmentManager = ((FragmentActivity) _context).getSupportFragmentManager();
			FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
			
			TabletLoginFragment loginFragment = new TabletLoginFragment();

			fragmentTransaction.add(R.id.login_fragment_holder, loginFragment);
			fragmentTransaction.commit();
		}

Both ways I can't get it working - what would you recommend to place fragment inside of a Dialog element ? 
