PercentRelativeLayout, how to set the height programatically
来源:互联网 发布:指纹解锁软件 编辑:程序博客网 时间:2024/05/21 21:54
Do you want to set a new percentage value? If yes, you need to:View view = findViewById(R.id.view_child);PercentRelativeLayout.LayoutParams params = (PercentRelativeLayout.LayoutParams) view.getLayoutParams();// This will currently return null, if it was not constructed from XML.PercentLayoutHelper.PercentLayoutInfo info = params.getPercentLayoutInfo();info.heightPercent = 0.60f;view.requestLayout();
动态改变百分比布局的比例,注意这句话,
// This will currently return null, if it was not constructed from XML.PercentLayoutHelper.PercentLayoutInfo info = params.getPercentLayoutInfo();
0 0
- PercentRelativeLayout, how to set the height programatically
- How to set the ListView Rows Height
- How to programatically unplug & replug an USB device in linux?
- iPhone - How set uinavigationbar height?
- How to set the style in valuelist
- How to: Set the ProtectionLevel Property
- How to stop the gridspliter when the height or width reach the thresholds
- How to set the Collation properties of the database
- How to set the QT Application icon in the windows.
- how to set UILable line height (line space, gap between lines)
- [Jenkins] Use python requests to programatically get and set Jenkins job configuration
- Master Pages / Content Pages. How to set the Form ID?
- How to set bmp for your UserControl in the toolbox
- svn : how to set the executable bit on a file?
- 关于JAVA界面风格(How to Set the Look and Feel)
- How to set the title of UIButton as left alignment?
- JS两栏等高:Javascript set two columns to have the same height
- How to set vim
- 主页配置升级版
- php 判断参数范围
- js控制一个三角图片的旋转
- 两种对象序列化方式
- 如何使用logminer查看日志内容
- PercentRelativeLayout, how to set the height programatically
- NSPredicate 谓词
- 在子线程中更新UI+延时更新(异步消息处理机制)
- C#位运算讲解与示例[转]
- log file sync 等待超高一例子
- ubuntu14.04,安装CDT(Eclipse开发C++和C的插件)
- android bin 文件夹下不能生成jar包
- DOS攻击之SYN攻击法
- Android开发知识点总结