title: Setting a maximum width on a ViewGroup
body: <p>How do I set the maximum width of a ViewGroup? I am using a <code>Theme.Dialog</code> activity, however, this does not look so good when resized to bigger screens, it's also sort of lightweight and I don't want it taking up the whole screen.</p>
  
  <p>I tried <a href="https://stackoverflow.com/questions/3702000/max-width-of-linearlayout">this suggestion</a> to no avail. Also, there is no <code>android:maxWidth</code> property like some views.</p>
  
  <p>Is there a way to restrict the root LinearLayout so that it is only (for example) 640 dip? I am willing to change to another ViewGroup for this.</p>
  
  <p>Any suggestions?</p>