問題詳情

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

參考答案

答案:B
難度:計算中-1
書單:沒有書單,新增

內容推薦

內容推薦