主要代码:
setContentView(R.layout.layout);
LayoutParams params = getWindow().getAttributes();
params.width = LayoutParams.MATCH_PARENT;
getWindow().setAttributes(params);
主要代码:
setContentView(R.layout.layout);
LayoutParams params = getWindow().getAttributes();
params.width = LayoutParams.MATCH_PARENT;
getWindow().setAttributes(params);
转载于:https://www.cnblogs.com/litaono1/p/4310401.html