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

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

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

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

        更改首选项的背景颜色

        时间:2023-08-29
          <tbody id='ZVZwG'></tbody>
              <bdo id='ZVZwG'></bdo><ul id='ZVZwG'></ul>
                  <i id='ZVZwG'><tr id='ZVZwG'><dt id='ZVZwG'><q id='ZVZwG'><span id='ZVZwG'><b id='ZVZwG'><form id='ZVZwG'><ins id='ZVZwG'></ins><ul id='ZVZwG'></ul><sub id='ZVZwG'></sub></form><legend id='ZVZwG'></legend><bdo id='ZVZwG'><pre id='ZVZwG'><center id='ZVZwG'></center></pre></bdo></b><th id='ZVZwG'></th></span></q></dt></tr></i><div id='ZVZwG'><tfoot id='ZVZwG'></tfoot><dl id='ZVZwG'><fieldset id='ZVZwG'></fieldset></dl></div>
                1. <legend id='ZVZwG'><style id='ZVZwG'><dir id='ZVZwG'><q id='ZVZwG'></q></dir></style></legend>

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

                2. <tfoot id='ZVZwG'></tfoot>
                  本文介绍了更改首选项的背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我有一个 PreferenceCategory xml 文件,我已经在其中定义了所有首选项,我从扩展 PreferenceActivity 的类中调用它.我无法设置我的设置屏幕的背景,这个屏幕是在下面显示的 xml 文件的帮助下显示的.请看我已经定义了android:background="#041A37",屏幕仍然保持默认颜色:黑色.

                  I have a PreferenceCategory, xml file and I have defined all preferences in it, I call this from class that extends PreferenceActivity. I am unable to set the background of my settings screen, this screen is displayed with help of xml file shown below. Please see that I have already defined the android:background="#041A37", still the screen remains default color: black.

                  public class MyPreferenceActivity extends PreferenceActivity {
                      @Override
                      public void onCreate(Bundle savedInstanceState) {
                          Context mContext=super.getBaseContext();
                          super.onCreate(savedInstanceState);
                          addPreferencesFromResource(R.layout.preference);
                          //v.setBackgroundColor(Color.rgb(4, 26, 55));
                      }
                  }
                  

                  <小时>

                  preference.xml 是


                  preference.xml is

                  <?xml version="1.0" encoding="utf-8"?>
                  <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
                      android:background="#041A37" >
                  
                      <PreferenceCategory>
                          <com.dropcall.SeekBarPreference
                              android:background="#041A37"
                              android:defaultValue="5"
                              android:key="@string/Interference_Delay"
                              android:progressDrawable="@drawable/seekbardrawable"
                              android:title="Seconds Delay until intereference" />
                  
                          <com.dropcall.SeekBarPreference2
                              android:defaultValue="30"
                              android:key="@string/Drop_Delay"
                              android:progressDrawable="@drawable/seekbardrawable"
                              android:title="Seconds delay until drop" />
                  
                          <CheckBoxPreference
                              android:background="@drawable/state_normal"
                              android:defaultValue="true"
                              android:key="@string/Drop_Option"
                              android:title="Close after call drop" />
                          <CheckBoxPreference
                              android:background="@drawable/state_normal"
                              android:defaultValue="true"
                              android:key="@string/Timer_Option"
                              android:title="Start timers on launch" />
                      </PreferenceCategory>
                  
                  </PreferenceScreen>
                  

                  <小时>

                  虽然我在每个文件中都设置了 android:background="#041A37",但背景并没有变成海军蓝或任何其他颜色.它保持默认颜色,黑色.如何更改背景颜色.请让我知道任何指针/提示,如果您遇到同样的问题,请告诉我您为设置背景颜色所做的更改.


                  Although I have set android:background="#041A37" in every file, the background doesn't turn into navy blue, or any other color for that matter. It remains default color, black. How to change the background color. Please let me know any pointers / hints , if you had faced same issue let me know what changes you made to set the background color.

                  推荐答案

                  这对我有用

                  getListView().setBackgroundColor(Color.TRANSPARENT);
                  
                  getListView().setCacheColorHint(Color.TRANSPARENT);
                  
                  getListView().setBackgroundColor(Color.rgb(4, 26, 55));
                  

                  这篇关于更改首选项的背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Android 模拟器使用 HAXM 冻结 OS X v10.9 (Mavericks) 下一篇:使用 VMWare/VirtualBox 之类的虚拟机进行调试?

                  相关文章

                  最新文章

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