Activity.SetTranslucent(Boolean) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將一個活動,特別是與 或 android.R.attr#windowIsTranslucentandroid.R.attr#windowIsFloating 歸屬的,轉換成全螢幕不透明活動,或將其從不透明轉回半透明。
[Android.Runtime.Register("setTranslucent", "(Z)Z", "GetSetTranslucent_ZHandler", ApiSince=30)]
public virtual bool SetTranslucent(bool translucent);
[<Android.Runtime.Register("setTranslucent", "(Z)Z", "GetSetTranslucent_ZHandler", ApiSince=30)>]
abstract member SetTranslucent : bool -> bool
override this.SetTranslucent : bool -> bool
參數
- translucent
- Boolean
true 從不透明轉成半透明。
false 從半透明轉為不透明。
傳回
這是設定半透明的結果。 如果設定成功true,則回退false,否則。
- 屬性
備註
將活動(特別是帶有 R.attr.windowIsTranslucent 或 R.attr.windowIsFloating 屬性)轉換成全螢幕不透明活動,或將其從不透明轉回半透明。
Android 參考資料。android.app.Activity.setTranslucent
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。