如何设置ImageView的某一个方向的外边距
来源:互联网 发布:网络拓扑环形结构 编辑:程序博客网 时间:2024/06/05 04:58
用到方法:ImageView的setLayoutParams(LayoutParams lp);
具体例子代码如下:
ImageView mImageView=(ImageView)findViewById(R.id.image);android.widget.LinearLayout.LayoutParams lp=(android.widget.LinearLayout.LayoutParams)mImageView.getLayoutParams();//设置自己需要的距离lp.leftMargin=100;mImageView.setLayoutParams(lp);
0 0
- 如何设置ImageView的某一个方向的外边距
- [CSS]如何设置文本的右外边距
- [CSS]如何设置文本的左外边距
- 外边距的垂直方向上的合并现象
- 如何解决外边距叠加的问题?
- [IOS]如何在Storyboard中设置Round Rect Button的外边距?
- android中如何去掉pulltorefreshlistview点击item时的背景颜色,与item外边距设置
- android中如何去掉pulltorefreshlistview点击item时的背景颜色,与item外边距设置
- 如何设置imageView的高和宽?
- css中的外边距合并时垂直方向上的普通流相邻元素间
- java代码怎么设置控件的外边距
- css的外边距合并(如何实现不合并)
- 设置ImageView的大小
- 设置ImageView的大小
- android的内外边距
- android组件的外边距
- 浅谈外边距的叠加
- CSS的外边距合并
- g++ 编译动态链接库和静态链接库
- Unit 2: Prepositions
- 使用oracle10g官方文档找到监听文件(listener.ora)的模板
- Unit 2: Conjunctions
- ucosii运用实例
- 如何设置ImageView的某一个方向的外边距
- 字符串链接变量
- Unit 2: Interjections
- Oracle的数据字典和动态性能视图
- C++中函数指针的运用
- 【软考】数据结构
- Unit 3: Reading
- 我与C++设计模式(十三)——策略模式
- hdu 4871 树的分治+最短路记录路径