android水平scrollview

你好
我测试水平scrollview我来到一个奇怪的问题,我把一个按钮在水平scrollview与布局高度和宽度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>

我如何用水平scrollview中的按钮填充布局

解决方法

问题可能在android:width =“wrap_content”…. 因为你的包装水平scrollview的内容,它是线性布局和按钮在上述情况下的父母……. 这可能会造成所有问题… 要么是硬编码大小的线性布局,要么将android:width =“fill_parent”放在水平滚动视图…..

相关文章

Android性能优化——之控件的优化 前面讲了图像的优化,接下...
前言 上一篇已经讲了如何实现textView中粗字体效果,里面主要...
最近项目重构,涉及到了数据库和文件下载,发现GreenDao这个...
WebView加载页面的两种方式 一、加载网络页面 加载网络页面,...
给APP全局设置字体主要分为两个方面来介绍 一、给原生界面设...
前言 最近UI大牛出了一版新的效果图,按照IOS的效果做的,页...