有没有办法将GUI屏幕(Activity)设置为200dip宽和150dip高,使用XML还是以编程方式?
我找到了getWindow().setLayout(),但是它只为宽度和高度采用了预定义的常量.
WindowManager.LayoutParams params = getWindow().getAttributes();
params.x = 0;
params.height = 650;
params.width = totalWidth;
params.y = totalHeght/10;
this.getWindow().setAttributes(params);
Run Code Online (Sandbox Code Playgroud)
也许它有效......但请确保值......
| 归档时间: |
|
| 查看次数: |
9125 次 |
| 最近记录: |