Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid Fragment Dialog appearing to ignore layoutMargin or layoutWidth when using weightSum
    primarykey
    data
    text
    <p>So I have DialogFragment that I create on button press used to select some info.</p> <p>It seems no matter what I do if I am using weightSum's the diaglog will fill the screen even if I specified a layoutMargin or width of the parent layout.</p> <p>This is on a Galaxy Tab running 3.2 and using the default Fragment library not the compatibility one.</p> <p>Any suggestions would be helpful.</p> <p>Thanks</p> <p>Below is the layout I am using.</p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/LinearLayoutZoneDialog" android:layout_width="400dp" android:layout_height="300dp" android:layout_gravity="center" android:background="@drawable/modal_background" android:orientation="horizontal" android:padding="20dp" android:weightSum="1" &gt; &lt;ListView android:id="@+id/zoneSelectListView" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight=".25" android:divider="@color/trans" android:listSelector="@android:color/transparent" android:padding="25dp" android:scrollbars="vertical" android:scrollbarFadeDuration="0" &gt; &lt;/ListView&gt; &lt;RelativeLayout android:id="@+id/zoneSelectImageLayout" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight=".75" android:gravity="center"&gt; &lt;ImageView android:id="@+id/zoneSelectMainImage" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@color/black_50_percent" android:scaleType="fitCenter" /&gt; &lt;ImageView android:id="@+id/zoneSelectCloseImage" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:src="@drawable/modal_close" android:padding="15dp" /&gt; &lt;/RelativeLayout&gt; &lt;/LinearLayout&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    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.
    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