<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:background="@color/RED"
tools:context=".MainActivity" > <HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/BLUE"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/GREEN"
>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/YELLOW"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:text="@string/hello_world"
/>
</RelativeLayout>
</HorizontalScrollView></RelativeLayout>
我希望绿色盖掉蓝色,按钮在右下角,或者绿色比蓝色的区域还宽,按钮在右边的屏幕之外,通过左右的滚动条才能拉到。问题在哪里呢?
解决方案 »
- 大侠救命了!BitmapFactory.decodeFile一直返回空
- Android ListView在滚动的时候上下边界会出现模糊效果,怎么去除啊?
- 我想问下开发一个DZ的 android 系统要花费多少钱?
- 如何取消AsyncTask正在执行的进程
- 如何获取屏幕解锁事件?
- 如何引用一个静态数组里边的值
- 关于正则表达一问
- 新手求助:如何进入系统的通讯记录页面
- 如何在Android代码中使用 adb shell命令
- xmpp协议的安卓消息推送Androidpn的client端出现xmpp连接失败
- Android 多点触控和单点触控同时进行的问题
- Android string.xml 显示特殊符号
内容大小超过容器大小才会出现滚动条的。
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/BLUE"
>
android:background="@color/BLUE"改为 android:background="@color/green"
在 <HorizontalScrollView></HorizontalScrollView>之间多加一个空的
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/GREEN"
>