Android ListView不是全宽的

Android ListView不是全宽的,android,xml,listview,Android,Xml,Listview,我在框架布局中创建了ListView项: home_activity.xml: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="

我在框架布局中创建了ListView项:

home_activity.xml:

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Home">

<ListView
    android:id="@+id/home_item_list"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center_vertical">
</ListView>
</FrameLayout>

home\u list\u item.xml:

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/home_item_activity_selector_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:minHeight="?android:attr/listPreferredItemHeight"
android:paddingLeft="15dp"
/>

我的问题是ListView项不是屏幕宽度的100%,而是标签的宽度

我必须改变什么


尝试删除
列表视图中的
android:gravity=“center\u vertical”
,并设置
android:layout\u width=“match\u parent”
而不是
文本视图中的
包装内容

更改

android:layout\u width=“wrap\u content”


android:layout\u width=“match\u parent”

您可以附加屏幕截图吗?添加的屏幕截图,您可以看到我的触摸,无法触摸您家中的非灰色区域\u activity.xml,请更改框架布局的宽度以填充\u parent。希望如此works@PratibhaS不,不幸的是,巴希尔·格洛丹的回答是正确的!home\u list\u要匹配的项目\u parent
android:layout\u width=“wrap\u content”
?@njzk2不,我尽了一切可能我同意。根据OP提供的信息,这是最有可能的解决方案。我认为存在缺陷,有时有效,有时无效。我在回答中建议了完全相同的解决方案。