【发布时间】:2015-08-27 07:58:20
【问题描述】:
我正在尝试在片段布局的列表视图末尾添加 webview。
这是我的片段布局。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/txtTheQueue"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/txt_the_queue"
android:textStyle="bold" />
<ListView
android:id="@+id/list_queue"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/txtTheQueue" />
<WebView
android:id="@+id/webViewQueue"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/list_queue" />
</RelativeLayout>
我尝试将 webview 添加到 listview 的页脚。 但得到这个例外:
java.lang.ClassCastException: android.widget.RelativeLayout$LayoutParams cannot be cast to android.widget.AbsListView$LayoutParams
帮帮我。
【问题讨论】:
-
请发布您的代码
-
@IntelliJ Amiya:我已经提到我正在遇到 ClassCastException ..
标签: android listview android-fragments android-listview webview