1

今、私はこのレイアウトを持っています:

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

<ScrollView
      android:layout_width="fill_parent"
      android:layout_height="fill_parent" >    

<LinearLayout 
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="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/problem_name"    
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="Loading..."
    />
    -->       

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

    <Button
    android:id="@+id/learn"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop ="5dp"
    android:text="Learn About Business Topics Below"
    android:textColor="@color/light_best_blue"
    />    



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


    </ListView>

    <Button
    android:id="@+id/extra_help"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop ="5dp"
    android:text="If You Need Help Planning"
    android:textColor="@color/light_best_blue"
    />             

</LinearLayout>

</ScrollView>

</LinearLayout>

しかし、それは壊れたレイアウトを示しています。

私がやろうとしていたのは、ListView でアイテムのリストをロードし、その下にボタンを追加することです。

どうすればそれを達成できますか?

ありがとう!

4

1 に答える 1

3

奇妙なことが起こらない限り、同じ方向にスクロール可能なビューをネストすることはできません。ただし、リストビューにヘッダー ビューとフッター ビューを追加すると、同じ効果が得られます。

于 2012-05-13T23:13:09.200 に答える