大家好,我正在测试水平滚动视图时遇到了一个奇怪的问题。我在水平滚动视图中放置了一个按钮,并将布局高度和宽度设置为fill_parent,但该标记在布局中没有效果。让我们来看一下我的布局:
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:fillViewport="true"
>
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Button
android:text="Button"
android:id="@+id/button1"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</Button>
</LinearLayout>
</HorizontalScrollView>
如何在水平滚动视图中填充按钮到布局中?