Note that there are some explanatory texts on larger screens.

plurals
  1. POCircular dependencies, need some help with exact code
    text
    copied!<p>I'm relatively new to Android and I've stucked with the following problem. I have an xml layout code, which seems to be working on 1.5, but fails on 1.6 and further with Circular dependencies are not allowed with RelativeLayout. I've googled some info on that error, and I got the basics. Still too few info about this topic. I still can't figure, where exactly that circular dependences occur in my code. Please, could some of you point me to the lines, where that happens, and explain why it so?</p> <p> </p> <pre><code>&lt;LinearLayout android:orientation="horizontal" android:layout_width="0dip" android:layout_weight="1" android:layout_height="wrap_content" android:gravity="center_horizontal"&gt; &lt;ImageView android:paddingTop="3dip" android:id="@+id/typeicon" android:scaleType="center" android:layout_width="fill_parent" android:layout_height="wrap_content"/&gt; &lt;/LinearLayout&gt; &lt;RelativeLayout android:orientation="vertical" android:layout_width="0dip" android:layout_weight="6.5" android:layout_height="fill_parent" android:paddingRight="20dip"&gt; &lt;RelativeLayout android:layout_alignParentTop="true" android:id="@+id/toprellistlayout" android:layout_width="fill_parent" android:layout_weight="1" android:layout_height="wrap_content"&gt; &lt;TextView android:id="@+id/trannumbertext" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:textSize="16sp" android:textStyle="bold" android:layout_alignParentLeft="true"/&gt; &lt;TextView android:id="@+id/summtext" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:textSize="16sp" android:layout_alignParentRight="true" android:textStyle="bold"/&gt; &lt;/RelativeLayout&gt; &lt;TextView android:layout_below="@id/toprellistlayout" android:id="@+id/maintranstext" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:layout_gravity="center" android:textSize="13sp" android:textStyle="bold" /&gt; &lt;RelativeLayout android:layout_width="fill_parent" android:layout_weight="1" android:paddingTop="4dip" android:layout_below="@id/maintranstext" android:id="@+id/toprellistlayout" android:layout_height="wrap_content"&gt; &lt;TextView android:id="@+id/datetext" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight=".3" android:textSize="11sp" android:text="01.01.0000 00:00:00" android:textStyle="bold" android:gravity="center" android:layout_alignParentLeft="true"/&gt; &lt;TextView android:id="@+id/statusview" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight=".7" android:gravity="center" android:text="@string/finlist_rejected" android:drawableLeft="@drawable/cross" android:drawablePadding="5dip" android:background="@android:id/empty" android:layout_alignParentRight="true" android:textStyle="bold" android:textSize="11sp"/&gt; &lt;/RelativeLayout&gt; &lt;/RelativeLayout&gt; </code></pre> <p></p>
 

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