我layout的XML有什么问题呢?

<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>
我希望绿色盖掉蓝色,按钮在右下角,或者绿色比蓝色的区域还宽,按钮在右边的屏幕之外,通过左右的滚动条才能拉到。
问题在哪里呢?
...全文
相关推荐
android layout XML解析错误的解决方法
从别的地方复制过来XML时,layout预览时提示解析错误。
Android 开发中layout下的子文件夹
主要介绍了android 开发中layout下的子文件夹,需要的朋友可以参考下
在XML中定义View
Android自定义View研究(四) -- 在XML中定义View.docx
android studio xml文件实现添加注释
主要介绍了android studio xml文件实现添加注释,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
Android_如何置底一个View(附_前置声明layout布局文件中的资源ID)
Android_如何置底一个View(附_前置声明layout布局文件中的资源ID)


