从Android小部件的文本框中检索文本? [英] Retrieve Text from Textbox in Android widget?

查看:15
本文介绍了从Android小部件的文本框中检索文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 App 小部件有一个 TextView,它的文本在与用户的交互中发生变化.现在我如何在运行时从中检索文本?

My App widget has a TextView that it's text changes in interaction with user.Now how I can Retrieve Text from it in run time?

推荐答案

你不能.应用小部件是只写的:您可以向它们推送数据,但不能读取它们.

You can't. App widgets are write-only: you can push data to them, but you cannot read them.

相反,当您使用新文本更新应用小部件时,您需要将该文本存储在某个地方,也许是在一个文件中.

Instead, when you update your app widget with new text, you will need to store that text somewhere, perhaps in a file.

这篇关于从Android小部件的文本框中检索文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆