我想设置滚动视图。这个怎么做?
在我的 Listview 中,我有 10 个项目要查看..我只能看到 7 个项目..Remanining 3 个项目我需要一个滚动视图才能看到..有任何可能保持滚动视图..请指导我..
<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>
LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); viewList = Nexttopic.this.getLayoutInflater().inflate(R.layout.activity_nexttopic, null); dialogMarketList = new Dialog(Nexttopic.this); dialogMarketList.requestWindowFeature(Window.FEATURE_NO_TITLE); dialogMarketList.setContentView(viewList); dialogMarketList.show(); lvForDialog = (ListView) viewList.findViewById(R.id.List_view); ArrayAdapter<String> adapter = (new ArrayAdapter<String>(Nexttopic.this, R.layout.row_topic, R.id.child_row,tnamelist)); lvForDialog.setAdapter(adapter);