遇到一个问题,如何在相对布局里把两个item放在同一行,而且高度一样呢?

<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"
tools:context=".MainActivity" > <TextView android:id="@+id/keywordLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="关键字:"
android:paddingTop="15px"
/> <EditText android:id="@+id/keywordEditText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/keywordLabel"
android:layout_alignBaseline="@id/keywordLabel"
/> <Button android:id="@+id/findKeywordButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/keywordEditText"
android:layout_alignRight="@id/keywordEditText"
android:text="查找"
/> <TextView android:id="@+id/ChapterTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="章节查询"
android:layout_below="@id/findKeywordButton"
android:paddingTop="15px" /> <TextView android:id="@+id/SuraIDText"
android:text="章:"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/ChapterTextView"
android:layout_alignBottom="@+id/SuraIDSpinner"
/> <Spinner android:id="@+id/SuraIDSpinner"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/SuraIDText"
/> <TextView android:id="@+id/AyaIDText"
android:text="节:"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/SuraIDText"
android:layout_weight="1.0"
android:layout_centerInParent="true"
/> <Spinner android:id="@+id/AyaIDSpinner"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/AyaIDText"
android:layout_alignBaseline="@+id/AyaIDText"
android:layout_weight="1.0"
/>
</RelativeLayout>

  

Gulan查询UI排布的更多相关文章

  1. 实现LinearLayout(垂直布局,Gravity内容排布)

    首先上Gravity的代码,Android原版的Gravity搞得挺复杂的,太高端了.但基本思路是使用位运算来做常量,我就自己消化了一些,按自己的思路来实现. 先上代码,在做分析. package k ...

  2. CSS布局之div交叉排布与底部对齐--flex实现

    最近在用wordpress写页面时,设计师给出了一种网页排布图样,之前从未遇到过,其在电脑上(分辨率大于768px)的效果图如下: 而在手机(分辨率小于等于768px)上要求这样排列: 我想到了两种方 ...

  3. 按照excel文档中的内容在当前cad图纸中自动排布实体

    本例实现的主要功能是读取excel文档中的内容,其次是将按照读取的信息在当前cad图纸中添加相应的实体.下面先介绍实现代码: CString excelPath; //外部excel文档的地址 Upd ...

  4. Python中cv2库和matplotlib库色彩空间排布不一致

    今天在python中读如图片时发现以下问题: 1.在from matplotlib import pyplot as plt之后,再import cv2 cv2.imshow()不能正常使用,还不知道 ...

  5. css 行内水平均等排布方式

    <div class="justify"> <span>测试1</span> <span>测试2</span> < ...

  6. GridView 二维排布

    与ListView一维排布相对 public class MainActivity extends Activity implements AdapterView.OnItemClickListene ...

  7. React实现座位排布组件

    React实现座位排布组件 最近在开发一个影院系统的后台管理系统,该后台可以设置一个影厅的布局. 后台使用的是react框架,一位大神学长在几天之内就把这个控件研究出来了,并进行了较为严密的封装,佩服 ...

  8. element UI排坑记(一):判断tabs组件是否切换

    之所以将这个问题列在排坑记之中,是因为官方组件的一个属性颇有些隐蔽,这个问题曾经折腾了本人较多时间,始终思维固着,且使用搜索引擎也不容易搜索到答案,故记之.然而实际解决却是相当简单的. 一.问题描述 ...

  9. android文本排布

    首先看一幅图,是简书App的一篇文章的截图,如下: 图1,图2 上面两个图片都是文本的显示,但是由于有多种格式,所以较为复杂,例如其中有普通文本,还有加粗的文本,还有图文混排的显示等等. 一.解析HT ...

随机推荐

  1. css页面点击文字出现蓝色底色去掉方法

    -moz-user-select: none; /*火狐*/     -webkit-user-select: none; /*webkit浏览器*/     -ms-user-select: non ...

  2. dos 加用户

    net user lipeng 1qaz3EDC /addnet user zhangnan 1qaz3EDC /addnet localgroup "Remote Desktop User ...

  3. Replace Pioneer 续用2

    软件介绍(摘自百度百科) Replace Pioneer(中文名:替换先锋)是Mind Pioneer出品的一款共享软件.    Replace Pioneer是一款与众不同的专业文本批量替换和处理软 ...

  4. tomee 系列问题

    1. remote client 无法建立连接 修改system.properties # allowed packages to be deserialized, by security we de ...

  5. 关于mysql占用CPU过高,问题解决

    使用SHOW PROCESSLIST 查看 原因: 使用了 一个触发器 不断的去删除日志,保证每个用户的日志只有10条 去掉之后,CPU使用率从97% 降到了 %. 利用show columns fr ...

  6. [转]轻松解决oracle11g 空表不能exp导出的问题

    转自:http://www.2cto.com/database/201109/105931.html oracle11g的新特性,数据条数是0时不分配segment,所以就不能被导出. 解决方法: 1 ...

  7. Lzlib 1.5 正式发布,C 语言压缩算法库

    Lzlib 1.5 正式发布,该版本移除了对废弃版本 0 文件的解压支持:修复了 struct LZ_Encoder 和 LZ_compress_sync_flush 相关的 bug. Lzlib 压 ...

  8. Scrum 是什么?

    Scrum 是什么? Scrum 是当前最流行的敏捷软件开发方法论和实施框架.但就像人们对 “Agile” 术语的不同理解一样,不同的人对 “Scrum” 也有着不同的理解.那么,到底 Scrum 是 ...

  9. [ACM_数学] 大菲波数 (hdu oj 1715 ,java 大数)

    大菲波数 Problem Description Fibonacci数列,定义如下:f(1)=f(2)=1f(n)=f(n-1)+f(n-2) n>=3.计算第n项Fibonacci数值.   ...

  10. jpa知识点

    @NotFound(action=NotFoundAction.IGNORE) 使用hibernate 注解配置实体类的关联关系,在many-to-one,one-to-one关联中,一边引用自另一边 ...