• <i id='KehUd'><tr id='KehUd'><dt id='KehUd'><q id='KehUd'><span id='KehUd'><b id='KehUd'><form id='KehUd'><ins id='KehUd'></ins><ul id='KehUd'></ul><sub id='KehUd'></sub></form><legend id='KehUd'></legend><bdo id='KehUd'><pre id='KehUd'><center id='KehUd'></center></pre></bdo></b><th id='KehUd'></th></span></q></dt></tr></i><div id='KehUd'><tfoot id='KehUd'></tfoot><dl id='KehUd'><fieldset id='KehUd'></fieldset></dl></div>
      • <bdo id='KehUd'></bdo><ul id='KehUd'></ul>

      1. <legend id='KehUd'><style id='KehUd'><dir id='KehUd'><q id='KehUd'></q></dir></style></legend>
      2. <small id='KehUd'></small><noframes id='KehUd'>

        <tfoot id='KehUd'></tfoot>

        在 android home 小部件中获取 TextView 的文本(不在活动中)?

        get text of a TextView in android home widget (not in activity)?(在 android home 小部件中获取 TextView 的文本(不在活动中)?)
        • <bdo id='dacRb'></bdo><ul id='dacRb'></ul>

          <small id='dacRb'></small><noframes id='dacRb'>

        • <i id='dacRb'><tr id='dacRb'><dt id='dacRb'><q id='dacRb'><span id='dacRb'><b id='dacRb'><form id='dacRb'><ins id='dacRb'></ins><ul id='dacRb'></ul><sub id='dacRb'></sub></form><legend id='dacRb'></legend><bdo id='dacRb'><pre id='dacRb'><center id='dacRb'></center></pre></bdo></b><th id='dacRb'></th></span></q></dt></tr></i><div id='dacRb'><tfoot id='dacRb'></tfoot><dl id='dacRb'><fieldset id='dacRb'></fieldset></dl></div>
            <tbody id='dacRb'></tbody>

          <legend id='dacRb'><style id='dacRb'><dir id='dacRb'><q id='dacRb'></q></dir></style></legend>
          • <tfoot id='dacRb'></tfoot>

                • 本文介绍了在 android home 小部件中获取 TextView 的文本(不在活动中)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我刚开始使用 android home 小部件进行编程,所以我可以通过 settextviewtext() 从我的小部件提供程序将文本设置为 home 小部件中的 textview,但是当我想从中获取文本时,我没有理想.不能像在活动中一样正常使用 findViewById(),然后使用 getText().有没有办法从小部件提供者那里获取主页小部件中的 textview 文本?或者告诉我如何从另一个活动中获得?

                  I just begin programming with android home widget, so i could set text to a textview in home widget from my widget provider by settextviewtext() but when i want to get text from it, i have no ideal. Can not use findViewById() as normal as in activity and then getText(). Is there any way to get text of textview in home widget from widget provider? Or show me how to get from another activity?

                  推荐答案

                  CommonsWare in这个问题说:

                  你不能.应用程序小部件是只写的:您可以将数据推送给它们,但是你无法阅读它们.

                  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 home 小部件中获取 TextView 的文本(不在活动中)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How do I size a UITextView to its content?(如何根据内容调整 UITextView 的大小?)
                  script.sh: line 1: ./gradlew: No such file or directory on Jenkins(script.sh:第 1 行:./gradlew:Jenkins 上没有这样的文件或目录)
                  Arduino: using Serial and Software Serial with bluetooth module(Arduino:使用带有蓝牙模块的串口和软件串口)
                  Access native serial port on Android(在Android上访问本机串口)
                  Android: USB Communication Android lt;-gt; External Device(Android:USB通信Androidlt;-gt;外接设备)
                  Sending commands from a PC to an Android phone - via physical connection (USB, Serial, etc)(从 PC 向 Android 手机发送命令 - 通过物理连接(USB、串行等))
                • <small id='GjPU1'></small><noframes id='GjPU1'>

                      <tfoot id='GjPU1'></tfoot>

                      <i id='GjPU1'><tr id='GjPU1'><dt id='GjPU1'><q id='GjPU1'><span id='GjPU1'><b id='GjPU1'><form id='GjPU1'><ins id='GjPU1'></ins><ul id='GjPU1'></ul><sub id='GjPU1'></sub></form><legend id='GjPU1'></legend><bdo id='GjPU1'><pre id='GjPU1'><center id='GjPU1'></center></pre></bdo></b><th id='GjPU1'></th></span></q></dt></tr></i><div id='GjPU1'><tfoot id='GjPU1'></tfoot><dl id='GjPU1'><fieldset id='GjPU1'></fieldset></dl></div>

                          <bdo id='GjPU1'></bdo><ul id='GjPU1'></ul>

                            <legend id='GjPU1'><style id='GjPU1'><dir id='GjPU1'><q id='GjPU1'></q></dir></style></legend>
                              <tbody id='GjPU1'></tbody>