Gulan查询UI排布
遇到一个问题,如何在相对布局里把两个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排布的更多相关文章
- 实现LinearLayout(垂直布局,Gravity内容排布)
首先上Gravity的代码,Android原版的Gravity搞得挺复杂的,太高端了.但基本思路是使用位运算来做常量,我就自己消化了一些,按自己的思路来实现. 先上代码,在做分析. package k ...
- CSS布局之div交叉排布与底部对齐--flex实现
最近在用wordpress写页面时,设计师给出了一种网页排布图样,之前从未遇到过,其在电脑上(分辨率大于768px)的效果图如下: 而在手机(分辨率小于等于768px)上要求这样排列: 我想到了两种方 ...
- 按照excel文档中的内容在当前cad图纸中自动排布实体
本例实现的主要功能是读取excel文档中的内容,其次是将按照读取的信息在当前cad图纸中添加相应的实体.下面先介绍实现代码: CString excelPath; //外部excel文档的地址 Upd ...
- Python中cv2库和matplotlib库色彩空间排布不一致
今天在python中读如图片时发现以下问题: 1.在from matplotlib import pyplot as plt之后,再import cv2 cv2.imshow()不能正常使用,还不知道 ...
- css 行内水平均等排布方式
<div class="justify"> <span>测试1</span> <span>测试2</span> < ...
- GridView 二维排布
与ListView一维排布相对 public class MainActivity extends Activity implements AdapterView.OnItemClickListene ...
- React实现座位排布组件
React实现座位排布组件 最近在开发一个影院系统的后台管理系统,该后台可以设置一个影厅的布局. 后台使用的是react框架,一位大神学长在几天之内就把这个控件研究出来了,并进行了较为严密的封装,佩服 ...
- element UI排坑记(一):判断tabs组件是否切换
之所以将这个问题列在排坑记之中,是因为官方组件的一个属性颇有些隐蔽,这个问题曾经折腾了本人较多时间,始终思维固着,且使用搜索引擎也不容易搜索到答案,故记之.然而实际解决却是相当简单的. 一.问题描述 ...
- android文本排布
首先看一幅图,是简书App的一篇文章的截图,如下: 图1,图2 上面两个图片都是文本的显示,但是由于有多种格式,所以较为复杂,例如其中有普通文本,还有加粗的文本,还有图文混排的显示等等. 一.解析HT ...
随机推荐
- Windows2003 II6.0 FTP 开了防火墙 FTP不能正常工作的解决办法
.在防火墙设置的“高级-本地连接-设置”中把FTP的勾选
- 二维码识别 android app
TextView类用于展示文本信息 ImageView展示 id:button1(用来显示“扫描二维码”) 布局:fill_parent使布满屏幕(高级版本用match_parent) wrap_co ...
- [VBS]脚本中的字典、动态数组、队列和堆栈
今天用VBS脚本写了几个程序,用到了字典(Dictionary).动态数组(ArrayList).队列(Queue)和堆栈(Stack).现在写篇Blog总结一下 :-) 1.编写环境 今天突发奇想下 ...
- 【Java学习笔记】泛型
泛型: jdk1.5出现的安全机制 好处: 1.将运行时期的问题ClassCastException转到了编译时期. 2.避免了强制转换的麻烦. <>: 什么时候用? 当操作的引用数据类型 ...
- c# 抓取Web网页数据分析
通过程序自动的读取其它网站网页显示的信息,类似于爬虫程序.比方说我们有一个系统,要提取BaiDu网站上歌曲搜索排名.分析系统在根据得到的数据进行数据分析.为业务提供参考数据. 为了完成以上的需求,我们 ...
- 数独求解 DFS && DLX
题目:Sudoku 题意:求解数独.从样例和结果来看应该是简单难度的数独 思路:DFS 设置3个数组,row[i][j] 判断第i行是否放了j数字,col[i][j] 判断第i列是否放了j数字.squ ...
- MHA安装手记
安装MHA服务器和客户端 # yum install perl-DBD-MySQL 在manager节点上: # yum install perl-DBD-MySQL # yum install pe ...
- java中两个值互换
两个值互换有以下三种方式: 使用临时变量(此种方法便于理解) x = 10; y = 20; //begin int temp = x; x = y; y = temp; //end; //此时x = ...
- SpringMVC配置入門
我的開發環境 開發工具: springsource-tool-suite-2.9.0 JDK版本: 1.6.0_29 tomcat版本:apache-tomcat-7.0.26 本文地址: ...
- Cocoapods降低版本及卸载
有的时候我们需要降低Cocoapods的版本来解决第三方库的兼容问题. 一. 移除pod组件 这条指令会告诉你Cocoapods组件装在哪里 : 1 $ which pod 你可以手动移除 ...