在一个活动中,我有一个按钮和一个列表视图列表。对于每个类别,我都有一个按钮,点击它可以显示相应的数据。这里是我的xml代码。滚动查看问题
<?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"
>
<Button android:layout_width="fill_parent"
android:layout_height="60dp"
android:id="@+id/button_1"
android:text="first"
/>
<Button android:layout_width="fill_parent"
android:layout_height="60dp"
android:id="@+id/button_2"
android:text="second"
/>
<Button android:layout_width="fill_parent"
android:layout_height="60dp"
android:id="@+id/button_3"
android:text="three"
/>
<Button android:layout_width="fill_parent"
android:layout_height="60dp"
android:id="@+id/button_4"
android:text="four"
/>
<Button android:layout_width="fill_parent"
android:layout_height="60dp"
android:id="@+id/button_5"
android:text="five"
/>
<Button android:layout_width="fill_parent"
android:layout_height="60dp"
android:id="@+id/button_6"
android:text="six"
/>
<Button android:layout_width="fill_parent"
android:layout_height="60dp"
android:id="@+id/button_7"
android:text="seven"
/>
<Button android:layout_width="fill_parent"
android:layout_height="60dp"
android:id="@+id/button_8"
android:text="eight"
/>
<ListView android:id="@+id/list" android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="fill_parent"/>
</LinearLayout>
在此活动中,第一个按钮是可见的。然后点击按钮,所有按钮将不可见,只有列表视图在那里。问题是如果我使用滚动视图,我可以滚动按钮,但只有一半的列表视图可以看到意味着我不能滚动它。如果我不使用滚动视图,我可以滚动列表视图而不是按钮。任何人都可以帮助我,我错了吗? 谢谢..
谢谢@surisahani – rose
你是最欢迎的@rose ..... :) –