DisplayMetrics outMetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(outMetrics);
width = outMetrics.widthPixels;
/*int heightPixels = outMetrics.heightPixels;*/
LinearLayout.LayoutParams params_1 = new LayoutParams(width / 4, 10);
时间: 2024-11-09 21:50:00