У меня есть listActivity, который отображает через адаптер фид XML извлекается из Интернета, ADN файл макета activity_list_feed.xml:я не могу добавить кнопку для линейной компоновки
`<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:drawSelectorOnTop="false"
android:transcriptMode="normal"
/>`
В графическом редакторе я не могу перетащить кнопка в эту схему, и когда я пытаюсь жёстко, как в этот файл:
`<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<Button
android:id="@+id/addBtn"
android:text="Add New Item"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:onClick="addItems"/>
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:drawSelectorOnTop="false"
android:transcriptMode="normal"
/>
</LinearLayout>`
я получаю сообщение об ошибке компиляции:
java.lang.ClassCastException: android.widget.LinearLayout не может be cast to android.widget.TextView
Как добавить кнопку в верхней части списка, потому что я хочу обновить pull.thank.