title: Android - How use Fragment as Dialog or Activity depending on device
body: <p>I'm very new to Android programming and I'm stuck at a point where I want to finish my UI development.
  The picture in this question simply explains my problem:
  <a href="https://stackoverflow.com/questions/10996217/dialog-fragment-embedding-depends-on-device">Dialog fragment embedding depends on device</a></p>
  
  <p>I want to create a reusable UI component with a Layout (probably LinearLayout or Relative Layout). Depending on the screen size (Tablet vs. Phone) I want to open the UI component in a Dialog or in a separate Activity.</p>
  
  <p>Can anyone of you give me an advice how to achieve this?</p>