Reputation: 851
Apparently I have duplicate attributes but cannot spot this, I have gone through the XML line by line but cannot see what's wrong. I have tried to clean, build and have also closed eclipse and opened it again. Also this is a new xml file I created in layout as I wanted to change the text displayed within listview instead of using the standard one
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
android:layout_height="0dp"
android:layout_width ="fill_parent"
android:textSize="20sp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:gravity="center">
</TextView>
Here is a screenshot of where the error is pointing to SCREENSHOT
Upvotes: 0
Views: 869
Reputation: 9870
ok, it is just an assumption, but the id "text1" is used by android System listview to refer to the internal build textview. Just use another id like
android:id="@+id/my_textview_1"
Upvotes: 2
Reputation: 3438
I guess problem is this line: android:id="@android:id/text1"
change it with this android:id="@+id/text1"
Upvotes: 2