Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/80.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android Wear RemoteInput设置选项自定义_Android_Wear Os - Fatal编程技术网

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());