让两个布局都在同一个控件的上方
2017-04-16 22:50
183 查看
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/activity_main" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <View android:id="@+id/view_top1" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_above="@+id/tv_test" android:background="@android:color/darker_gray"/> <View android:id="@+id/view_top2" android:layout_above="@+id/tv_test" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/holo_red_dark" android:visibility="gone"/> <TextView android:id="@+id/tv_test" android:layout_alignParentBottom="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" /> </RelativeLayout>
相关文章推荐
- 线性布局中两个控件,一个居右显示
- 有关RelativeLayout布局中, 当一个控件被左右两个控件夹在中间时, 此控件如何靠近两个控件中的一个的问题?
- WPF布局控件AvalonDock介绍以及应用中遇到的一个问题
- 、首先,我们添加一个主界面窗体,命名为MainForm,该窗体IsMdiContainer设置为True,也就是设置为多文档窗体格式。拖拉布局控件"WeifenLuo.WinFormsUI.Docking.DockPanel"到主窗体MainForm中,并
- JAVA--编写一个JFrame,标题为“计算的窗口”,在该窗口中组件的布局是FlowLayout。窗口中添加两个文本区,当我们在一个文本区中输入若干个数时,另一个文本区同时对输入的数进行求和运算并求
- 怎么用java代码写一个线性布局;布局里面有两个按钮是水平的
- 设计一个检查控件布局的工具
- 解决问题--VS2012中一个Panel覆盖另一个Panel时拖动时容易造成两个控件成父子关系的避免
- 完成一个GUI应用程序,一个窗口中含有4个按钮,两个label,按照流式布局器进行布局,每个组件之间间隔20px,居右对齐。
- .Net平台Winform两个ComboBox控件绑定同一个数据源的问题
- 在编辑页面布局,点击其中的一个控件时,不自动定位到页面的代码
- 一个最基本的布局控件-panel
- jquery 两个控件同享一个function
- 使用jquery当页面打开时,将一个事件绑定到控件(同时执行两个事件),并修改加载样式类中的样式
- java--第十周--任务二 编写一个JFrame,在该窗口中组件的布局是FlowLayout。窗口中添加两个文本区,当我们在一个文本区中输入若干个数时,另一个文本区同时对输入的数进行
- 怎样在vs2010里面实现两个编辑控件对应一个消息处理函数
- 两个控件使用同一个对应函数的方法
- A,B两个页面,A里面用iframe包含B,现在在A里面要取得B里面一个Hidden控件的value
- 关于相对布局中控件摆放位置的一个需要注意的小地方
- 解决问题--VS2012中一个Panel覆盖另一个Panel时拖动时容易造成两个控件成父子关系的避免