PictureInPictureParams.Builder.SetExpandedAspectRatio(Rational) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定擴展畫中畫模式的畫面比例。
[Android.Runtime.Register("setExpandedAspectRatio", "(Landroid/util/Rational;)Landroid/app/PictureInPictureParams$Builder;", "GetSetExpandedAspectRatio_Landroid_util_Rational_Handler", ApiSince=33)]
public virtual Android.App.PictureInPictureParams.Builder SetExpandedAspectRatio(Android.Util.Rational? expandedAspectRatio);
[<Android.Runtime.Register("setExpandedAspectRatio", "(Landroid/util/Rational;)Landroid/app/PictureInPictureParams$Builder;", "GetSetExpandedAspectRatio_Landroid_util_Rational_Handler", ApiSince=33)>]
abstract member SetExpandedAspectRatio : Android.Util.Rational -> Android.App.PictureInPictureParams.Builder
override this.SetExpandedAspectRatio : Android.Util.Rational -> Android.App.PictureInPictureParams.Builder
參數
- expandedAspectRatio
- Rational
理性:不得介於2.39:1與1:2.39之間(含)。 若為空,則不支援擴展畫中畫模式。
傳回
這個建構者實例。 這個值不可能為零值。
- 屬性
備註
設定擴展畫中畫模式的畫面比例。 長寬比定義為所需的寬度/高度。 在顯示 PIP 時,畫面比例不能從水平切換到垂直,也無法從垂直切換到水平。 任何此類變更將被忽略。 設定擴展比例會顯示該活動對擴展模式的支援。 需要使用 PackageManager.hasSystemFeature(String) 偵測的 PackageManager.FEATURE_EXPANDED_PICTURE_IN_PICTURE 功能。
Android 參考資料。android.app.PictureInPictureParams.Builder.setExpandedAspectRatio
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。