我想设置这些参数
IF (the phone is in vertical orientation)
imageView.setLayoutParams(new Gallery.LayoutParams(400, 400));
ELSE ()
imageView.setLayoutParams(new Gallery.LayoutParams(600, 600));
我想设置这些参数
IF (the phone is in vertical orientation)
imageView.setLayoutParams(new Gallery.LayoutParams(400, 400));
ELSE ()
imageView.setLayoutParams(new Gallery.LayoutParams(600, 600));
您可以使用该getRotation()
方法检查设备的旋转,并在活动重新启动时设置图像参数!
有关功能的详细信息,请参见此链接,并在if
条件中使用它。