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

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

      <tfoot id='TVRUz'></tfoot>
      • <bdo id='TVRUz'></bdo><ul id='TVRUz'></ul>
      <legend id='TVRUz'><style id='TVRUz'><dir id='TVRUz'><q id='TVRUz'></q></dir></style></legend>
    1. 以编程方式更改应用小部件背景颜色

      Changing app widget background color programmatically(以编程方式更改应用小部件背景颜色)

      <legend id='QDHF0'><style id='QDHF0'><dir id='QDHF0'><q id='QDHF0'></q></dir></style></legend>

      <tfoot id='QDHF0'></tfoot>

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

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

                问题描述

                如何以编程方式设置主屏幕应用小部件的背景颜色?

                How do I set the background color of the home screen app widget programmatically?

                推荐答案

                记住小部件是remoteView.您的资源非常有限,无法直接更新小部件的 UI.

                Remember widget is remoteView. You have very limited resource to updates UI of widget and not directly.

                你可以试试:

                remoteViews.setInt(viewId, "setBackgroundColor", Color.BLACK);
                

                我从没用过,但我想可能是这样.

                I never used it but i guess it may be the way.

                我猜你需要动态改变颜色.

                I guess you need to change color dynamically.

                这篇关于以编程方式更改应用小部件背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文档推荐

                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、串行等))
                Android: RS232 Serial Communication with android device(Android:与安卓设备的RS232串行通信)
                • <small id='uAol7'></small><noframes id='uAol7'>

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

                        <tbody id='uAol7'></tbody>
                      1. <legend id='uAol7'><style id='uAol7'><dir id='uAol7'><q id='uAol7'></q></dir></style></legend>
                          <bdo id='uAol7'></bdo><ul id='uAol7'></ul>
                          <tfoot id='uAol7'></tfoot>