Android Wear RemoteInput设置选项自定义
通过以下链接中的“添加预定义文本响应”部分,我可以添加“是”、“否”等选项 我想根据每个选项自定义图标。怎么做 现有的一个: 我想要什么: 在下图中,我想自定义每个图标 使用的代码Android Wear RemoteInput设置选项自定义,android,wear-os,Android,Wear Os,通过以下链接中的“添加预定义文本响应”部分,我可以添加“是”、“否”等选项 我想根据每个选项自定义图标。怎么做 现有的一个: 我想要什么: 在下图中,我想自定义每个图标 使用的代码 RemoteInput remoteInput = new RemoteInput.Builder("com.example.android.support.wearable.notifications.REPLY") .setLabel("Choose Car")
RemoteInput remoteInput = new RemoteInput.Builder("com.example.android.support.wearable.notifications.REPLY")
.setLabel("Choose Car")
.setAllowFreeFormInput(true)
.setChoices(new String[] { "Choice 1", "Choice 2", "Choice 3" })
.build();
NotificationCompat.Action chooseCarAction = new NotificationCompat.Action.Builder(
R.drawable.uber_badge,
"Choose Car",
uberPendingIntent)
.addRemoteInput(remoteInput)
.build();
NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(context)
.setSmallIcon(R.drawable.ic_launcher)
.setVibrate(new long[]{50, 50, 50})
.setContentTitle("Wake Up")
.setContentText("Train reached Bangalore Cantonment Station.")
//.setStyle(bigStyle.bigText(content))
.setLargeIcon(BitmapFactory.decodeResource(context.getResources(), R.drawable.ic_launcher))
mNotificationManager.notify(notifyId, notificationBuilder.build());