Android 如何保持滚动视图?

Android 如何保持滚动视图?,android,scrollview,Android,Scrollview,我想设置scrollview。如何做到这一点 在我的列表视图中,我有10个项目要查看..我只能看到7个项目..还有3个项目我需要一个scrollview查看..有任何可能保留scrollview..请指导我 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" andro

我想设置scrollview。如何做到这一点

在我的列表视图中,我有10个项目要查看..我只能看到7个项目..还有3个项目我需要一个scrollview查看..有任何可能保留scrollview..请指导我

<RelativeLayout 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=".Nexttopic" >

     <ListView
        android:id="@+id/List_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true" >
     </ListView>
</RelativeLayout>

您应该尝试使用一种叫做: 很抱歉我的最后一个答案。请阅读:Listview具有内置滚动功能。将其封装在任何其他布局中,如LinearLayout或RelativeLayout。如果仍然存在问题,请显示一些代码

EDIT:
不知道,但是试试这个

          listview.setTranscriptMode(ListView.TRANSCRIPT_MODE_ALWAYS_SCROLL);

滚动视图的原因是什么?您已经让listview将高度设置为match_parent,它将自行处理滚动项目

使用此布局,而不是使用scrollview

<RelativeLayout 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=".Nexttopic" >

     <ListView
        android:id="@+id/List_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
     </ListView>
</RelativeLayout>

无需为listview放置scrollview。它将根据listview中的行数自动滚动。

保留滚动视图是什么意思?@artemzinnatullin我在listview中有10个项目,它只显示7个项目,我想滚动查看其余3个项目,我无法滚动..请引导我..在listview中我有10个项目它不滚动,我看不到滚动…在问题中发布您的活动代码查看我的代码..在问题中我无法滚动…如何将滚动视图保持为列表视图..列表视图提供了自己的默认滚动视图!!我无法滚动…请指导我第一次…查看编辑尝试使用可能有效的。。!不,我不能滚动
<RelativeLayout 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=".Nexttopic" >

     <ListView
        android:id="@+id/List_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
     </ListView>
</RelativeLayout>