[Galaxy S II Android Development] maskerwsk:
Hi again buddy.

just found a little issue with the mod.

When the toggle is turned off, the icons show as they should,

however when I turn on the toggle the icon disappears.

the toggle still works etc, just no icon.

any ideas :)

EDIT - here is the code im using in red (I removed one set of icons, only want stock and s5)

# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.locals 8
.parameter "context"

.prologue
[COLOR="Red"]invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v1

const-string v2, "toggles_chooser"

const v3, 0x0

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

move-result v1

const v2, 0x1

if-eq v2, v1, :cond_themes5

const v1, 0x7f0a00e1

const v2, 0x7f0201ef #tw_quick_panel_icon_airplane_on

const v3, 0x7f0201ee #tw_quick_panel_icon_airplane_off

goto :goto_new

:cond_themes5

const v1, 0x7f0a00e1

const v2, 0x7f0202fd #s5tw_quick_panel_icon_airplane_on

const v3, 0x7f0202fc #s5tw_quick_panel_icon_airplane_off

:goto_new[/COLOR]

const/4 v4, 0x0

.line 98
const/4 v2, 0x0

sget-boolean v0, Lcom/android/systemui/statusbar/Feature;->mUseJellyBeanGUI:Z

if-nez v0, :cond_0

const/4 v0, 0x1

:goto_0
invoke-direct {p0, p1, v2, v0}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Z)V

.line 57
new-instance v0, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton$AutoRotationObserver;

invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton$AutoRotationObserver;-><init>(Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton;)V

iput-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton;->mAutoRotationObserver:Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton$AutoRotationObserver;

.line 65
iput-boolean v4, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton;->mSupportFolderType:Z

.line 68
new-instance v0, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton$1;

invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton$1;-><init>(Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton;)V

iput-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AutoRotateQuickSettingButton;->mIntentReceiver:Landroid/content/BroadcastReceiver;

.line 100
sget-boolean v0, Lcom/android/systemui/statusbar/Feature;->mUseJellyBeanGUI:Z

if-eqz v0, :cond_1

move-object v0, p0

move v5, v4

move v6, v4

invoke-virtual/range {v0 .. v6}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;->initLayout(IIIIII)V

.line 111
:goto_1
invoke-virtual {p0, p0}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;->setListener(Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton$Listener;)V

.line 112
return-void

:cond_0
move v0, v4

.line 98
goto :goto_0

.line 108
:cond_1
const v0, 0x7f0201f0

invoke-virtual {p0, v1, v0}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;->initLayout(II)V

goto :goto_1
.end method