随手记录20160721
来源:互联网 发布:软件系统模块化设计 编辑:程序博客网 时间:2024/05/20 23:33
//[1]stretch
v. 伸展; 延伸; 持续; 包括;n. 伸展; 弹性; 一片; 一段时间;adj. 可伸缩的; 弹性的;
align
vt. 使成一线,使结盟; 排整齐;
vi. 排列; 成一条线;
[例句]There are signs that the prime minister is aligning himself with the liberals
有迹象表明首相正在与自由党人结盟。
//[2]
android:layout_below="@+id/imageButton0"
android:layout_alignLeft="@+id/imageButton0"//对这种写法表示怀疑
android @+id @id 的区别:
@+id/xxx 是新添加一个int id值;例如: android:id="@+id/imageButton2"
@id/xxx 是在调用 android:layout_below 、 android:layout_alignLeft 之类的相对布局的时候用来确定本控件处于 xxx控件的某个方向上;
[特殊情况]:当在使用RelativeLayout 布局时,如图所示:
分别为 5 个ImageView;什么时候用到@+id/xxx 来指定布局位置而不是给一个控件设置id呢?如下
;当ImageView4 还没有定义前,也就是 imageView0 的定义xml代码在 imageView4 的前面,imageView0就可以这么写
android:layout_toLeftOf="@+id/imageButton4"
;我觉得应该是这样,但是现在 在AndroidStudio中 不写其中的‘+’也正确,可能是androidstudio优化了,而eclipse没有优化的原因吧,
//下面是一段无管紧要的xml
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <!-- 添加顶部图片 --> <ImageView android:layout_width="match_parent" android:id="@+id/imageButton5" android:layout_height="wrap_content" android:scaleType="centerCrop" android:layout_weight="1" android:src="@drawable/top" /> <!-- 添加一个相对布局管理器 --> <RelativeLayout android:layout_weight="2" android:layout_height="wrap_content" android:background="@drawable/bottom" android:id="@+id/relativeLayout1" android:layout_width="match_parent"> <!-- 添中间位置的图片 --> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/imageButton0" android:src="@drawable/in" android:layout_centerInParent="true" /> <!-- 添加上方显示的图片 --> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/imageButton1" android:src="@drawable/setting" android:layout_above="@id/imageButton0" android:layout_alignRight="@id/imageButton0" /> <!-- 添加下方显示的图片 --> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/imageButton2" android:src="@drawable/exit" android:layout_below="@+id/imageButton0" android:layout_alignLeft="@+id/imageButton0" /> <!-- 添加左侧方显示的图片 --> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/imageButton3" android:src="@drawable/help" android:layout_toLeftOf="@+id/imageButton0" android:layout_alignTop="@+id/imageButton0" /> <!-- 添加右侧显示的图片 --> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/imageButton4" android:src="@drawable/board" android:layout_toRightOf="@+id/imageButton0" android:layout_alignTop="@+id/imageButton0" /> </RelativeLayout></LinearLayout>
0 0
- 随手记录20160721
- 随手记录
- 随手记录
- 随手记录
- 随手记录
- 随手记录
- 随手记录
- NFS配置随手记录
- 经验随手记录
- 随手记录(之后整理)
- Mysql随手记录
- Untiy ShaderLab 随手记录
- 随手记录--爬虫基本概念
- 随手记录-通信协议基础知识
- 随手记录--网络编程
- 随手记录--线程
- 随手记录--python基础知识
- 随手记录--Go基础知识
- 剑指offer——求1到n的和
- 数据请求——严大哥
- 配置错误 不能在此路径中使用此配置节
- 内部类的访问二
- cell让分割线左对齐
- 随手记录20160721
- 爬虫服务器环境部署
- User Secrets – Storing sensitive data in ASP.NET Core projects
- linux信号量实现线程读写同步
- Linux下Oracle配置开机自启动
- Git学习(二)
- urlscheme白名单问题以及项目适配iOS9遇到的一些问题及解决办法
- Thinking in Java 第17章 容器深入研究(17.8-17.9)
- Postfix+Dovecot编译、安装及配置