[Sony Cross-Device Development Themes and Apps] Bloodlvst:
Hey bro,

I'm trying to use this with your SwitchPreferences guide. The toggle switch works, but the nav bar is always tinted, it doesn't change. I've changed all the keys and made sure that my XML is good, but nothing happens.

My XML is like this:

<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/wireless_networks_settings_title"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<PreferenceCategory android:title="@string/rm_ui_navbar_resize_category" />
<com.android.settings.rz.MySeekBarPreference android:title="@string/rm_ui_navbar_resize_portrait" android:key="navigation_bar_height" settings:type="15" />
<com.android.settings.rz.MySeekBarPreference android:title="@string/rm_ui_navbar_resize_landscape" android:key="navigation_bar_width" settings:type="16" />
<PreferenceCategory android:title="@string/rm_ui_navbar_tweak_category" />
<SwitchPreference android:title="@string/rm_ui_navbar_tint_toggle" android:key="key_navbar_color_mod" android:defaultValue="false" android:summaryOn="@string/rm_ui_navbar_tint_toggle_on" android:summaryOff="@string/rm_ui_navbar_tint_toggle_off" />
</PreferenceScreen>

And my smali like so:

.class public Lcom/android/settings/rz/EnableNavBarTint;
.super Lcom/android/settings/SettingsPreferenceFragment;
.source "EnableNavBarTint.java"

# instance fields
.field private mENABLE_NAV_BAR_TINT:Landroid/preference/SwitchPreference;

# direct methods
.method public constructor <init>()V
.locals 0

.prologue
.line 28
invoke-direct {p0}, Lcom/android/settings/SettingsPreferenceFragment;-><init>()V

return-void
.end method

# virtual methods
.method public onCreate(Landroid/os/Bundle;)V
.locals 5
.param p1, "savedInstanceState" # Landroid/os/Bundle;

.prologue
const/4 v3, 0x0

const/4 v2, 0x1

.line 42
invoke-super {p0, p1}, Lcom/android/settings/SettingsPreferenceFragment;->onCreate(Landroid/os/Bundle;)V

.line 43
invoke-virtual {p0}, Lcom/android/settings/rz/EnableNavBarTint;->getActivity()Landroid/app/Activity;

move-result-object v1

invoke-virtual {v1}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v0

.line 44
.local v0, "resolver":Landroid/content/ContentResolver;
const v1, 0x7f08008a # xml public key

invoke-virtual {p0, v1}, Lcom/android/settings/rz/EnableNavBarTint;->addPreferencesFromResource(I)V

.line 46
const-string v1, "key_navbar_color_mod"

invoke-virtual {p0, v1}, Lcom/android/settings/rz/EnableNavBarTint;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

move-result-object v1

check-cast v1, Landroid/preference/SwitchPreference;

iput-object v1, p0, Lcom/android/settings/rz/EnableNavBarTint;->mENABLE_NAV_BAR_TINT:Landroid/preference/SwitchPreference;

.line 47
iget-object v4, p0, Lcom/android/settings/rz/EnableNavBarTint;->mENABLE_NAV_BAR_TINT:Landroid/preference/SwitchPreference;

const-string v1, "navbar_color_mod"

invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v1

if-ne v1, v2, :cond_0

move v1, v2

:goto_0
invoke-virtual {v4, v1}, Landroid/preference/SwitchPreference;->setChecked(Z)V

.line 57
return-void

:cond_0
move v1, v3

.line 47
goto :goto_0
.end method

.method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
.locals 5
.param p1, "preferenceScreen" # Landroid/preference/PreferenceScreen;
.param p2, "preference" # Landroid/preference/Preference;

.prologue
const/4 v1, 0x0

const/4 v2, 0x1

.line 61
iget-object v3, p0, Lcom/android/settings/rz/EnableNavBarTint;->mENABLE_NAV_BAR_TINT:Landroid/preference/SwitchPreference;

if-ne p2, v3, :cond_1

.line 62
iget-object v3, p0, Lcom/android/settings/rz/EnableNavBarTint;->mENABLE_NAV_BAR_TINT:Landroid/preference/SwitchPreference;

invoke-virtual {v3}, Landroid/preference/SwitchPreference;->isChecked()Z

move-result v0

.line 63
.local v0, "value":Z
invoke-virtual {p0}, Lcom/android/settings/rz/EnableNavBarTint;->getActivity()Landroid/app/Activity;

move-result-object v3

invoke-virtual {v3}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v3

const-string v4, "navbar_color_mod"

if-eqz v0, :cond_0

move v1, v2

:cond_0
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z

.line 78
.end local v0 # "value":Z
:goto_0
return v2

.line 65
:cond_1
invoke-super {p0, p1, p2}, Lcom/android/settings/SettingsPreferenceFragment;->onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z

move-result v2

goto :goto_0
.end method

Any ideas bro? :(