如何在android通知直接回复中使用数字键盘?

时间:2017-12-12 10:18:01

标签: android notifications android-7.0-nougat android-7.1-nougat remote-input

我想在android通知的直接回复中使用数字键盘,并且还想为它设置输入过滤器。

RemoteInput remoteInput =
          new RemoteInput.Builder("log").setLabel(defaultUnitBG == 1 ? "mg/dL" : "mmol").build();

      NotificationCompat.Action replyAction = null;
      NotificationCompat.Action.Builder actionBuilder =
          new NotificationCompat.Action.Builder(R.drawable.white_circle, replyLabel,
              getLogPendingIntent(context, notificationScheduleObject, iUniqueId, notificationId));

      actionBuilder.setAllowGeneratedReplies(true);

0 个答案:

没有答案