遇到一个问题,如何在相对布局里把两个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. [Chapter 3 Process]Practice 3.8: Describe the differences among short-term, medium-term, long-term scheduling

    3.8 Describe the differences among short-term, medium-term, and longterm scheduling. 答案: 长期调度决定哪些进程进 ...

  2. 关于java声明的一点杂感

    从php这种弱类型的语言转到java,每次看到这种声明,一下子转不过弯来,总感觉很违和,最近思考了一下,有了点感悟 FileInputStream fileInputStream = new File ...

  3. Android性能优化方法(四)

    在一个应用程序中,一般都会存在多个Activity,每个Activity对应着一个UI布局文件.一般来说,为了保持不同窗口之间的风格统一,在这些UI布局文件中,几乎肯定会用到很多相同的布局.如果我们在 ...

  4. (转) Active Record

    ActiveRecord是什么:1. 每一个数据库表对应创建一个类.类的每一个对象实例对应于数据库中表的一行记录; 通常表的每个字段在类中都有相应的Field;2. ActiveRecord同时负责把 ...

  5. fgetc和fputc函数

    1.输入函数 以下三个函数可用于一次读一个字符. #include <stdio.h> int getc( FILE *fp ); int fgetc( FILE *fp ); int g ...

  6. MyBatis学习之路之configuration配置

    1.首先讲解的是MyBatis核心配置文件configuration.xml的配置 一个完整的configuration.xml配置顺序如下: properties,settings,typeAlia ...

  7. Vmware Vsphere WebService SDK开发(第一讲)-基本知识学习

    刚开始这方面开发的时候,不知道如何下手,能够查到的资料特别少,而且看到很多网友和我一样也在找这方面的资料.接下来的一段时间我就结合自己所参与的项目,完成关于Vmware Vsphere WebServ ...

  8. 安装windows git客户端

    从git官网下载安装包,双击安装,一路默认配置,直到完成 打开git bash,运行 ssh-keygen -t rsa -C "573215750@qq.com" 回车,输入“y ...

  9. 我总结的Android编程规范

    命名规则 1). 类名,接口名:以大写开头,如果一个类的类名由多个单词组成,所有单词的首字母必须大写,单词尽量写全称,不要简写,除非约定俗成的名字,例如:URL,RTMP,RTSP 这些广泛使用的专有 ...

  10. nginx lua整合安装

    安装lua JIT 下载 wget http://luajit.org/download/LuaJIT-2.0.4.tar.gz 解压: tar zxvf LuaJIT-2.0.4.tar.gz 进入 ...