gpt4 book ai didi

Android 传输通过互联网查看并重新显示它

转载 作者:行者123 更新时间:2023-11-30 04:04:25 24 4
gpt4 key购买 nike

可以通过互联网传输一个 View ,例如 TextView,另一部运行 android 的手机,并让该手机重新显示原始 TextView 中的内容吗?如果可以,怎么办?序列化是否适用于 View 对象?

最佳答案

It is possible to transfer a View, such as a TextView over the internet to say, another phone running android, and have that phone redisplay what was in the original TextView?

仅当您自己编写代码时。

Because you can't really do that with other things such as buttons, unless you specifically write code for every type of widget/view

正确。

现在,如果您愿意将小部件的图像发送给另一方,您应该能够在一般基础上做到这一点,让小部件将自己绘制到位图-backed Canvas。然后,您可以将 Bitmap 转换为 PNG 或 JPEG,然后通过 Internet 将其发送给另一方。

关于Android 传输通过互联网查看并重新显示它,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11972753/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com