0

我有一个带有 ListView 的布局。列表滚动良好,但有时页面上的其他内容需要更大,并且列表或其他内容占用了太多屏幕,所以我需要全部滚动。

可以这样做吗?

这是我到目前为止的布局:

<?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"
        >

<include android:id="@+id/header"
         layout="@layout/header"
         android:layout_height="wrap_content"
         android:layout_width="fill_parent"/>    

<TextView
    android:id="@+id/view_name"    
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="Business:"
    />       

<TextView
    android:id="@+id/business_privacy"    
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="Loading..."
    />     

<TextView
    android:id="@+id/think"    
    android:layout_width="fill_parent"
    android:layout_marginTop ="5dp"
    android:textColor="@color/light_best_blue"
    android:paddingLeft="10px"   
    android:layout_height="wrap_content"
    android:text="Fill out each section below"
    />     

    <ListView
    android:id="@android:id/list"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@+id/label"
        android:textSize="20px"
       >        
    </ListView>

</LinearLayout>

即使文本占据了整个屏幕,有什么方法可以让用户轻松查看文本和列表?我可以使文本可滚动吗?它在水平视图中尤其糟糕,所以我认为必须有一些 ux 模式才能让它发挥得很好。

感谢您的建议!

4

2 回答 2

1

1-将具有较大文本的文本视图放在列表视图的标题中,以便它与列表一起滚动...

或者

2-将文本视图放在其他固定大小的滚动视图中,如屏幕的 1/3。

于 2012-06-09T12:41:22.920 回答
1

您可以进行内容包装,也可以使用HorizontalScrollView. 可以在此处找到有关它的 Android 文档。

于 2012-06-09T12:42:25.537 回答