Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat's wrong with the ICS Holo Dialog theme?
    primarykey
    data
    text
    <p>I've come across a bit of a weird issue with activities using the Holo Dialog theme (<code>@android:style/Theme.Holo.Dialog</code>) in Ice Cream Sandwich.</p> <p>It seems like they ignore their layouts and fill the entire screen instead of the layout width and height from their XML layouts. The same layouts are working as expecting in Honeycomb, but not on Ice Cream Sandwich.</p> <p><strong>Example:</strong></p> <p>The correct way (Honeycomb) <img src="https://i.stack.imgur.com/hchDc.jpg" alt="enter image description here"></p> <p>The incorrect way (Ice Cream Sandwich) <img src="https://i.stack.imgur.com/Tq6aL.jpg" alt="enter image description here"></p> <p>Both devices are running the exact same version of the application, and are using the exact same layout. Here's the layout in question:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/linearLayout1" android:layout_width="940dp" android:layout_height="600dp" android:layout_margin="10dp" &gt; &lt;GridView android:id="@+id/gridView1" android:layout_width="940dp" android:layout_height="600dp" android:horizontalSpacing="10dp" android:numColumns="3" android:smoothScrollbar="true" android:stretchMode="columnWidth" android:verticalSpacing="10dp" &gt; &lt;/GridView&gt; &lt;/LinearLayout&gt; </code></pre> <p>Any ideas to how this can be solved? A similar issue occurs on my ICS-based Galaxy Nexus, which completely ignore the <code>match_parent</code> tag for height and width. Is the dialog theme broken in ICS?</p> <p><strong>Update:</strong></p> <p>I've done some more testing, and it seems like 894dp of width or less will produce the "correct" look, but if I set the width to 895dp or more, it'll be the incorrect look. The emulator's acting the same way. This is extremely weird...</p> <p><img src="https://i.stack.imgur.com/taGmv.jpg" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload