ListView专注于列表中的最后一项?(ListView focus on the last item in the list? - Xamarin Forms)
有人能告诉我如何将
ListView
焦点始终放在最后一个列表项上吗? 按照WhatsApp中的对话示例,当我们发送消息时,刚刚到达的消息总是集中在......或者任何类似的解决方案?我想要的是无论何时在
ListView
插入某些内容,而不是使用“让”选项查看下面的项目,我希望它是另一种方式。 始终显示屏幕上的最后一项。Could someone tell me how to keep the
ListView
focus always on the last list item? Following the example of a conversation in WhatsApp, where when we send a message, the message that has just arrived is always focused ... or any similar solution?What I look for is whenever something is inserted in the
ListView
, instead of the Give the option to go up to view the items below, I would like it to be the other way around. Always displaying the last item on the screen.
原文:https://stackoverflow.com/questions/44620309
最满意答案
正如评论中所说:
Rabbitmq需要以下插件来支持基于websockets的MQTT( http://github.com/rabbitmq/rabbitmq-web-mqtt )
As thrashed out in the comments:
Rabbitmq requires the following plugin to support MQTT over websockets (http://github.com/rabbitmq/rabbitmq-web-mqtt)
相关问答
更多-
我一直在使用Android上的MQTT进行一些工作,并且遇到了完全相同的问题。 正如戴尔所说的,MQTT客户端的旧版本以前有一个明确的ping()方法,但不幸的是这个方法现在被隐藏起来了。 最简单的方法和我使用的方法是明确地向特定主题发布一个1字节的消息,以作为保持活动。 我不认为这应该会增加应用程序的开销,并且虽然我不熟悉Mosquitto的ACL,但我认为您可以让每个客户端都使用相同的“keepalive”主题,并为所有客户提供写入访问权限。 只要没有人能够阅读该主题,这应该不会影响安全性。 另一种方法 ...
-
一旦发送消息,就没有在MQTT中删除消息的概念。 最接近的是清除保留的消息,并通过发布带有空/空有效负载的消息来完成此操作。 除非您自己向负载添加一个消息,否则MQTT消息中也没有时间戳。 There is no concept of deleting a message in MQTT, once sent it's sent. The closest would be to clear a retained message and you do this by publishing a message ...
-
这包含在IMqttAsyncClient的文档中 IMqttToken token method(parms, Object userContext, IMqttActionListener callback) 在此形式中,使用该方法注册回调。 当操作成功或失败时,将通知回调。 在MQTT客户端管理的线程上调用回调,因此在回调中最小化处理非常重要。 否则,将禁止MQTT客户端的操作。 例如,在连接完成时收到通知(回调): IMqttToken conToken; conToken = asyncCl ...
-
新客户端在Paho Java客户端连接时的回调函数(Callback function when new client connect in Paho java client)[2022-02-28]
这不可能从客户端完成,MQTT协议除了将验证信息从单个客户端传递给代理以外,不支持其他任何方式,而不是相反。 你必须从经纪人那里做。 不同的经纪人都以不同的方式实施身份验证,因此完全取决于您使用哪个经纪人。 Mosquitto有一个API来编写认证插件。 例如https://github.com/jpmens/mosquitto-auth-plug HiveMQ还有一个API http://www.hivemq.com/blog/mqtt-security-fundamentals-advanced-aut ... -
我面临着同样的问题,无论是为嵌入式Linux设备选择paho还是Mosquitto c ++客户端库。 我首先尝试了PAHO的最小应用程序。 它基本上支持我需要的所有功能,但是cpp-library-wrapper没有,我觉得主项目分支paho.mqtt.cpp不能很好地维护。 由于有两个功能 加密 设置所有连接选项,如mqtt-version等 这些不是通过PAHO中的mainBranch cpp-lib提供的,我现在将使用libmosquitto和libmosquittopp包装器。 所以当你看到我的决 ...
-
我建议尝试使用不同的工具来复制问题。 在代理运行时,运行订阅客户端: mosquitto_sub -h
-t in/# -v 然后单独做出版: mosquitto_pub -h -t in/device -m message 这应该很快返回,你的mosquitto_sub实例应该in/device message打印。 重复发布,你应该看到同样的事情。 如果您没有看到重复的消息,则代理会出现问题。 如果然后尝试使用例如mosquitto作为经纪人并重复您的代码 ... -
Eclipse Paho MQTT客户端:如何检查现有连接?(Eclipse Paho MQTT Client: How to check for existing connection?)[2022-05-14]
我明白了:显然,原始发布中的示例代码绝对没有错。 事实证明,我一次又一次地将MQTT服务器的端口附加到addr参数(在这里没有显示代码的一部分,因为我没有怀疑错误的来源),每次发布publish_MQTT( )函数被调用。 这使addr char字符串增长并最终超过指定的长度,从而导致SegFault。 这样一切都按预期工作: printf("\nADDR = %s\n\n", addr); // DEBUG OUTPUT if (!MQTTClient_isConnected(client)) { ... -
只需尝试连接到主设备,通过适当的错误处理来包围呼叫。 如果超时或连接错误,只需在处理程序中使用代码来调用slave。 如果那里也没有回应,那就纾困并假设链条坏了。 此外,群集可以使用不同的配置来仅显示单个IP,这更有意义。 因此,这里有一个面向外的别名队列,但是集群中不同机器上的逻辑队列。 如果您希望向外部分发连接到群集的可能性,这将在以后帮助您。 Client libraries in many languages have this option. The list can be checked her ...
-
正如评论中所说: Rabbitmq需要以下插件来支持基于websockets的MQTT( http://github.com/rabbitmq/rabbitmq-web-mqtt ) As thrashed out in the comments: Rabbitmq requires the following plugin to support MQTT over websockets (http://github.com/rabbitmq/rabbitmq-web-mqtt)
-
正如num8er在评论中指出的那样: ws://test.mosquitto.org:8080 / mqtt就足够了 As num8er has indicated in the comments: ws://test.mosquitto.org:8080/mqtt should be enough