【发布时间】:2015-09-10 07:57:53
【问题描述】:
我在一个片段中只有一个列表视图和其他视图。
如下面的视图转储所示,由于某种原因,层次结构中有两个列表视图(具有相同的资源 id)。
我认为这里未填充的列表视图(顶部)掩盖了我填充的列表视图。
这个列表视图是什么(在屏幕截图中选择)以及如何删除它/找到它的来源。
我的这个片段的代码如下:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/dark"
android:orientation="vertical">
<include layout="@layout/empty_view"/>
<include layout="@layout/progress_bar"/>
<com.application.custom.CustomListView
android:id="@+id/main_list_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</RelativeLayout>
更新:
活动只是加载片段:
HomeFrag homeFragment = new HomeFrag();
getSupportFragmentManager().beginTransaction()
.add(R.id.homelist_fragment_container, homeFragment, "home_fragment")
.commit();
【问题讨论】:
标签: android android-layout android-listview android-view