0
我打算将此切换为使用Table而不是ListView,但我担心的是这些项目不是相对的,因为它们应该被提供给提供的XML。RelativeLayout项目不相对
是否存在有关LinearLayout是否会导致问题的内容?
<?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">
<ViewSwitcher
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/dashboardViewSwitcher" android:layout_gravity="center">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<include
android:layout_width="wrap_content"
android:layout_height="wrap_content"
layout="@layout/loading" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dashboardActivity_Header"
android:id="@+id/dashboardActivityHeader"/>
<ListView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/dashboardActivityList"/>
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dashboardNews_Header"
android:id="@+id/dasboardNewsHeader"/>
<ListView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/dashboardNewsList"/>
</RelativeLayout>
</ViewSwitcher>
</LinearLayout>