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

      • <bdo id='1ZTAK'></bdo><ul id='1ZTAK'></ul>

    1. <tfoot id='1ZTAK'></tfoot>

    2. <small id='1ZTAK'></small><noframes id='1ZTAK'>

    3. <legend id='1ZTAK'><style id='1ZTAK'><dir id='1ZTAK'><q id='1ZTAK'></q></dir></style></legend>
    4. 更改 remoteView ImageView 背景

      时间:2023-09-08

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

        1. <tfoot id='lgazj'></tfoot>
        2. <legend id='lgazj'><style id='lgazj'><dir id='lgazj'><q id='lgazj'></q></dir></style></legend>

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

                <bdo id='lgazj'></bdo><ul id='lgazj'></ul>
                  <tbody id='lgazj'></tbody>
              • 本文介绍了更改 remoteView ImageView 背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我有一些带有 ImageViews 的 remoteView,我需要以编程方式更改android:background".

                I have some remoteView with ImageViews, and I need to change the "android:background" programmatically.

                我知道如何更改android:src":

                I know how to change the "android:src" with:

                remoteView.setImageViewResource(int viewId, int srcId);
                

                它工作正常,但我如何更改android:background"?

                And it works fine, but how do I change the "android:background"?

                谢谢

                推荐答案

                可以使用public void setInt(int viewId, String methodName, int value)方法.

                remoteView.setInt(R.id.viewid, "setBackgroundResource", R.color.your_color)
                

                这篇关于更改 remoteView ImageView 背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:如何在 Android Widget 上实现 Button 下一篇:在 android Widgets 中实现 ListView

                相关文章

                <tfoot id='VooRd'></tfoot>

              • <small id='VooRd'></small><noframes id='VooRd'>

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