簡體   English   中英

在Android中禁用通知欄的觸摸事件

[英]Disable touch event for notification bar in Android

顯示我的活動時,是否可以禁用在通知欄上的單擊?

基本上,我想鎖定通知欄,以便用戶將無法與其進行交互。

在通知中進行設置:

PendingIntent contentIntent = PendingIntent.getActivity(this, 0,
                                                        null,
                                                        Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);

您可以使活動全屏顯示。 將此添加到清單文件中的活動標記中:

android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM