これらのパラメータを設定したい
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
条件で使用します。