Android View坐标getLeft, getRight, getTop, getBottom
来源:互联网 发布:python telnet 回显 编辑:程序博客网 时间:2024/05/17 20:41
参考:http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2013/0412/1156.html
在Android中可以把left相当于X轴值, top相当于Y轴值, 左上角就是(0,0),从上到下依次递增,从做到右依次递增
相应API:
视图左侧位置 view.getLeft()
视图右侧位置 view.getRight()
视图顶部位置 view.getTop();
视图底部位置 view.getBottom();
视图宽度 view.getWidth();
视图高度 view.getHeight()
以上API获得的值都是相对父视图获得的:
视图的left , top , right , bottom 的值是针对其父视图的相对位置, 绿色区域是针对其父视图(即黄色区域为(0, 0)点)的坐标,不应该是(115, 170 ) 而是 (55, 55)
0 0
- Android View坐标getLeft, getRight, getTop, getBottom
- Android View坐标getLeft, getRight, getTop, getBottom
- Android View坐标getLeft, getRight, getTop, getBottom
- Android View坐标getLeft, getRight, getTop, getBottom
- Android View坐标getLeft, getRight, getTop, getBottom
- Android View坐标getLeft, getRight, getTop, getBottom
- Android View坐标getLeft, getRight, getTop, getBottom
- Android View坐标getLeft, getRight, getTop, getBottom
- Android View坐标getLeft, getRight, getTop, getBottom
- Android View坐标getLeft, getRight, getTop, getBottom
- Android View坐标getLeft, getRight, getTop, getBottom
- 天天记录 - Android View坐标getLeft, getRight, getTop, getBottom
- Android View坐标getLeft, getRight, getTop, getBottom解惑
- Android View坐标getLeft, getRight, getTop, getBottom解惑
- Android View坐标getLeft, getRight, getTop, getBottom解惑
- 天天记录 - Android View坐标getLeft, getRight, getTop, getBottom
- Android View坐标getLeft, getRight, getTop, getBottom解惑
- Android View坐标getLeft, getRight, getTop, getBottom解惑
- androidManifest
- 【POJ】1721 - CARDS(置换群)
- 支持向量机(SVM)的详细推导过程及注解(一)
- 1016. 部分A+B (15)--刷题纪录
- 使用CocoaPods卡在了"pod setup"界面的解决办法
- Android View坐标getLeft, getRight, getTop, getBottom
- Java IO操作——字节-字符转换流(OutputStreamWriter、InputStreamReader)
- Calendar查表法输出月份和星期
- jstree使用【二】右击菜单
- git 操作提示fatal: Unable to create '***/.git/index.lock': File exists.
- 《第一行代码》3.2View测量 笔记
- 【专题训练】成绩统计表
- linux系统运行java swing 程序
- shell中各种括号的作用()、(())、[]、[[]]、{}