Megosztás a következőn keresztül:


Activity.SetInheritShowWhenLocked(Boolean) Method

Definition

Specifies whether this Activity should be shown on top of the lock screen whenever the lockscreen is up and this activity has another activity behind it with the showWhenLock attribute set.

[Android.Runtime.Register("setInheritShowWhenLocked", "(Z)V", "GetSetInheritShowWhenLocked_ZHandler", ApiSince=29)]
public virtual void SetInheritShowWhenLocked (bool inheritShowWhenLocked);
[<Android.Runtime.Register("setInheritShowWhenLocked", "(Z)V", "GetSetInheritShowWhenLocked_ZHandler", ApiSince=29)>]
abstract member SetInheritShowWhenLocked : bool -> unit
override this.SetInheritShowWhenLocked : bool -> unit

Parameters

inheritShowWhenLocked
Boolean

true to show the Activity on top of the lock screen when this activity has another activity behind it with the showWhenLock attribute set; false otherwise.

Attributes

Remarks

Specifies whether this Activity should be shown on top of the lock screen whenever the lockscreen is up and this activity has another activity behind it with the showWhenLock attribute set. That is, this activity is only visible on the lock screen if there is another activity with the showWhenLock attribute visible at the same time on the lock screen. A use case for this is permission dialogs, that should only be visible on the lock screen if their requesting activity is also visible. This value can be set as a manifest attribute using android.R.attr#inheritShowWhenLocked.

Java documentation for android.app.Activity.setInheritShowWhenLocked(boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to