Hi all.

I want to apply theme over setting application wide.

So I implemented below code but there was no effect. Please give me
help.


1. AndroidMenifest.xml

    <application android:label="@string/settings_label"
            android:icon="@drawable/ic_launcher_settings"
            android:theme="@android:style/Widget.ListView"
            android:taskAffinity="">
            -> added Widget.ListView style provided in android system
                and I changed style.xml file like below



2. FrameWork/base/core/res/res/values/styles.xml

    before change : <item
name="android:listSelector">@android:drawable/
list_selector_background</item>

    After change:
    <style name="Widget.ListView" parent="Widget.AbsListView">
        <item name="android:listSelector">@android:drawable/
list_selector_background_gradation</item>
        <item name="android:cacheColorHint">?android:attr/
colorBackgroundCacheHint</item>
        <item name="android:divider">@android:drawable/
divider_horizontal_dark_opaque</item>



3. FrameWork/base/core/res/res/drawable/
list_selector_background_gradation.xml

    -> I made list_selector_background_gradation.xml with below code.
        But those are really same to list_selector_background.xml and
just have XXX_gradation.

<selector xmlns:android="http://schemas.android.com/apk/res/android";>
    <item android:state_window_focused="false"
        android:drawable="@color/transparent" />
    <!-- Even though these two point to the same resource, have two
states so the drawable will invalidate itself when coming out of
pressed state. -->
    <item android:state_focused="true" android:state_enabled="false"
        android:state_pressed="true"
        android:drawable="@drawable/
list_selector_background_disabled_gradation" />
    <item android:state_focused="true" android:state_enabled="false"
        android:drawable="@drawable/
list_selector_background_disabled_gradation" />
    <item android:state_focused="true" android:state_pressed="true"
        android:drawable="@drawable/
list_selector_background_transition_gradation" />
    <item android:state_focused="false" android:state_pressed="true"
        android:drawable="@drawable/
list_selector_background_transition_gradation" />
    <item android:state_focused="true"
        android:drawable="@drawable/
list_selector_background_focus_gradation" />
</selector>

4. FrameWork/base/core/res/res/drawable/
list_selector_background_transition_gradation.xml
    -> I made list_selector_background_transition_gradation.xml with
below code.
        But those are really same to
list_selector_background_transition.xml and just have XXX_gradation.

<transition xmlns:android="http://schemas.android.com/apk/res/
android">
    <item android:drawable="@android:drawable/
list_selector_background_pressed_gradation"  />
    <item android:drawable="@android:drawable/
list_selector_background_longpress_gradation"  />
</transition>


5. add image files
    -> I added new image files like below.

FrameWork/base/core/res/res/drawable-hdpi/
list_selector_background_disabled_gradation.9.png
FrameWork/base/core/res/res/drawable-hdpi/
list_selector_background_focus_gradation.9
FrameWork/base/core/res/res/drawable-hdpi/
list_selector_background_longpress_gradation.9
FrameWork/base/core/res/res/drawable-hdpi/
list_selector_background_pressed_gradation.9


And I do full build and expect to change background image in the
setting application but I couldn't

Please help me and let me know what is problem.

Thanks in advance
Mycall.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to