• <tfoot id='JrR0h'></tfoot>

    • <bdo id='JrR0h'></bdo><ul id='JrR0h'></ul>
    1. <legend id='JrR0h'><style id='JrR0h'><dir id='JrR0h'><q id='JrR0h'></q></dir></style></legend>

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

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

        Android小部件:如何更改按钮的文本

        时间:2023-09-08

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

                <small id='84cdw'></small><noframes id='84cdw'>

                  <bdo id='84cdw'></bdo><ul id='84cdw'></ul>
                  <tfoot id='84cdw'></tfoot>
                  本文介绍了Android小部件:如何更改按钮的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如何在代码而不是 XML 文件中更改 Android 按钮小部件的文本?

                  How can I change the text of an Android button widget within code and not the XML file?

                  推荐答案

                  我能够像这样更改按钮的文本:

                  I was able to change the button's text like this:

                  import android.widget.RemoteViews;
                  
                  //grab the layout, then set the text of the Button called R.id.Counter:
                  RemoteViews remoteViews = new RemoteViews(getPackageName(), R.layout.my_layout);
                  remoteViews.setTextViewText(R.id.Counter, "Set button text here");
                  

                  这篇关于Android小部件:如何更改按钮的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何从 Widget 传递数据并打开 Activity?[安卓] 下一篇:使用 Cordova 的 Android 小部件

                  相关文章

                  • <bdo id='Mxoe4'></bdo><ul id='Mxoe4'></ul>

                    <tfoot id='Mxoe4'></tfoot>
                    1. <small id='Mxoe4'></small><noframes id='Mxoe4'>

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