如何用JS设置参数控件的宽度
1个回答
2017-02-15 · 知道合伙人互联网行家
关注
展开全部
getWidth(),,如果全屏显示就设置LayoutParams.WINDOW_SERVICE);2;
return display.setLayoutParams(new LayoutParams(LayoutParams.getSystemService(Context;
public int getScreenWidth() {
WindowManager wm = (WindowManager) sInstance
, LayoutParams.getDefaultDisplay().MATCH_PARENT如果自适应就设置LayoutParams;
int height = getScreenHeight/.WRAP_CONTENT.MATCH_PARENT));
Display display = wm.WRAP_CONTENT
int width = getScreenWidth/
全屏
imageView].WRAP_CONTENT)), LayoutParams.setLayoutParams(new LayoutParams(LayoutParams.setLayoutParams(new LayoutParams(width;2;
imageView];
自适应
imageView].MATCH_PARENT, height)),,然后只进去就行了获取屏幕的宽度和高度然后计算出你控件的大小
return display.setLayoutParams(new LayoutParams(LayoutParams.getSystemService(Context;
public int getScreenWidth() {
WindowManager wm = (WindowManager) sInstance
, LayoutParams.getDefaultDisplay().MATCH_PARENT如果自适应就设置LayoutParams;
int height = getScreenHeight/.WRAP_CONTENT.MATCH_PARENT));
Display display = wm.WRAP_CONTENT
int width = getScreenWidth/
全屏
imageView].WRAP_CONTENT)), LayoutParams.setLayoutParams(new LayoutParams(LayoutParams.setLayoutParams(new LayoutParams(width;2;
imageView];
自适应
imageView].MATCH_PARENT, height)),,然后只进去就行了获取屏幕的宽度和高度然后计算出你控件的大小
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询