Nexus 7平板电脑未显示通知操作

时间:2018-03-09 12:22:44

标签: android android-notifications notification-action

我正在尝试使用Android 6.0.1在Nexus 7上显示通知操作,但它没有显示。是因为操作系统吗?我已经使用Android 7.0测试了S6边缘,看起来很完美。

NotificationCompat.Builder(this, resources.getString(R.string.default_notification_channel_id))
            .setSmallIcon(R.mipmap.ic_launcher_round)
            .setContentIntent(pIntent)
            .setAutoCancel(true)
            .setSound(defaultSoundUri)
            .addAction(NotificationCompat.Action(R.mipmap.ic_launcher, resources.getString(R.string.confirm_action_notification), yesPendingIntent))
            .addAction(NotificationCompat.Action(R.mipmap.ic_launcher, resources.getString(R.string.deny_action_notification), noPendingIntent))
            .setPriority(PRIORITY_MAX)
            .setDefaults(Notification.DEFAULT_VIBRATE)
            .setCustomHeadsUpContentView(headsUpView)
            .setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
            .setCustomContentView(collapsedView)
            .setCustomBigContentView(expandedView)
            .setStyle(NotificationCompat.DecoratedCustomViewStyle())
            .setPublicVersion(privateNotification)
            .build()

1 个答案:

答案 0 :(得分:0)

请试试下面的代码:

Sub BandB2()
' BandB2 Macro
' Keyboard Shortcut: Ctrl+b
'
    Application.Goto Reference:="R20C10"
    Selection.Copy
    Windows("EDI PO Consolidated - 2018.xlsx").Activate
    ActiveSheet.Range("$A$1:$X$2628").AutoFilter Field:=2, Criteria1:= _
        "34535453"
    Application.Goto Reference:="R1C9"
    Range("I2058").Select
    Application.CutCopyMode = False
    Selection.Copy
    Windows("Book and Bill form - template.xlsm").Activate
    Range("J26").Select
    ActiveSheet.Paste
    Windows("EDI PO Consolidated - 2018.xlsx").Activate
    ActiveWindow.SmallScroll ToRight:=4
    Application.Goto Reference:="R1C17"
    Range("Q2058").Select
    Range(Selection, Selection.End(xlDown)).Select
    Application.CutCopyMode = False
    Selection.Copy
    Windows("Book and Bill form - template.xlsm").Activate
    ActiveWindow.SmallScroll Down:=6
    Range("C33").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Windows("EDI PO Consolidated - 2018.xlsx").Activate
    Application.Goto Reference:="R1C14"
    Range("N2058").Select
    Range(Selection, Selection.End(xlDown)).Select
    Application.CutCopyMode = False
    Selection.Copy
    Windows("Book and Bill form - template.xlsm").Activate
    Range("D33").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Windows("EDI PO Consolidated - 2018.xlsx").Activate
    Application.Goto Reference:="R1C18"
    Range("R2058:T2058").Select
    Range(Selection, Selection.End(xlDown)).Select
    Application.CutCopyMode = False
    Selection.Copy
    Windows("Book and Bill form - template.xlsm").Activate
    Range("E33").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
End Sub