java: change to use display metrics

This commit is contained in:
rafal1137 2021-03-08 20:56:36 +01:00
parent 46c4715170
commit 7b48c371fe

View file

@ -101,8 +101,8 @@ public class ETLMain extends Activity {
LinearLayout etl_Layout = new LinearLayout(this);
RelativeLayout.LayoutParams etl_Params = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
1024);
RelativeLayout.LayoutParams etl_Params = new RelativeLayout.LayoutParams(Resources.getSystem().getDisplayMetrics().widthPixels,
Resources.getSystem().getDisplayMetrics().heightPixels);
etl_Layout.addView(imageView, etl_Params);
setContentView(etl_Layout);