0

次のコードを使用して、すべてのビデオを横向きで開くにはどうすればよいですか? すべてのビデオを横向きで開き、最後の位置からのデバイスの向きの回転に応じて向きを変更します。

Intent intent=new Intent(Intent.ACTION_VIEW); 
intent.setDataAndType(uri, "video/mp4");
startActivity(intent);
4

2 に答える 2

0

このコードを使用してください

setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

于 2013-04-22T12:58:41.947 に答える
0
 android:screenOrientation="landscape"
Set This Property In Your Manifest File On your Particular activity.
E.g-
<activity android:name=".MainActivity"
            android:screenOrientation="landscape"></activity>
于 2013-04-22T12:52:14.000 に答える