Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I was also trying out this script, as I'm new to Android programming and I was looking for some good examples to learn from.</p> <p>My app force closes when I add the layout to the main.xml.</p> <p>When I add the layout for the ExpendablePanel, the graphical layout becomes grayed out and I can't edit it:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cl="http://schemas.android.com/apk/lib/com.martin.myapp.widgets" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" &gt; &lt;com.martin.myapp.widgets.ExpandablePanel android:orientation="vertical" android:layout_height="wrap_content" android:layout_width="fill_parent" cl:handle="@+id/expand" cl:content="@+id/value" cl:collapsedHeight="50dip"&gt; &lt;TextView android:id="@id/value" android:layout_width="fill_parent" android:layout_height="wrap_content" android:maxHeight="50dip" /&gt; &lt;Button android:id="@id/expand" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="More" /&gt; &lt;/com.martin.myapp.widgets.ExpandablePanel&gt; </code></pre> <p>So this is essentially an empty app without the custom widget.</p> <p>I made a ExpandablePanel.java and copied the script that extends LinearLayout in there, gives me no errors. My attrs.xml is also error free.</p> <p>Eclipse gives me no errors when running. It runs and sends it to my phone fine. That's where it force closes. When I remove the ExpandablePanel layout in main.xml it runs and is an empty app.</p> <p>I really can't figure it out.</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