118. 在 Android 開發上,如需鎖定畫面為直式不旋轉,下列設定何者正
確?
(A) 於 Activity 的 onCreate()方法中 setContentView()之後加入
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULL
SCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN)
(B) 於 Activity 的 onCreate()方法中 setContentView()之後加入
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PO
RTRAIT)
(C) 於 Layout XML 檔內設定
android:screenOrientation="portrait"
(D) 以上設定方式皆可