I have a problem where my code automatically changes while I’m clicking or moving the cursor somewhere. This happens in a layout XML.
I use Eclipse Juno and I inserted an ExpandableList. My min sdk is 14 and max is 16.
It seems though that only the .xml part changes and not the layout. The .xml part, if opened again, is ok, but it does the same thing.
Helpz?
EDIT
I also noticed that the expandable list does not show up when I run the code(it just calls the layout)
The XML file:
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:text="Large Text"
android:textAppearance="?android:attr/textAppearanceLarge" />
<ExpandableListView
android:id="@+id/expandableListView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/textView1" >
</ExpandableListView>
Do you mean the code visually changes to other lines of code already in your XML file? Eclipse does this to me every now and then. Not sure why (I’m guessing it might be a bug with Lint) but usually closing and re-opening Eclipse fixes it for me.
From what I remember the code actually isn’t changing, just what’s being displayed.